bugfix: highlight search patterns on the right line

[?]
Jul 31, 2023, 3:29 PM
IM7UEBMKYG6UT2MS34ZUVM5ZLN5YUZXOHJ6GVUSFMHRAK3JKULBQC

Dependencies

  • [2] TWXPV2AC hoist and duplicate a conditional
  • [3] KKMFQDR4 editing source code from within the app
  • [4] HALS7E5U more clearly skip prints before screen top
  • [5] ZPQI5UL3 bugfix: never use utf8 pos in string.sub
  • [6] ZE7LVQNE improve a comment
  • [7] SDEY7LFJ rename a variable
  • [*] BULPIBEG beginnings of a module for the text editor

Change contents

  • replacement in text.lua at line 35
    [2.38][2.38:121]()
    if pos <= State.cursor1.pos and pos + frag_len >= State.cursor1.pos then
    [2.38]
    [3.3]
    if pos <= State.cursor1.pos and pos + frag_len > State.cursor1.pos then
  • replacement in text.lua at line 45
    [2.149][2.149:232]()
    if pos <= State.cursor1.pos and pos + frag_len >= State.cursor1.pos then
    [2.149]
    [3.243]
    if pos <= State.cursor1.pos and pos + frag_len > State.cursor1.pos then
    Text.draw_cursor(State, State.left+Text.x(screen_line, State.cursor1.pos-pos+1), y)
    elseif pos + frag_len == State.cursor1.pos then
    -- Show cursor at end of line.
    -- This place also catches end of wrapping screen lines. That doesn't seem worth distinguishing.
    -- It seems useful to see a cursor whether your eye is on the left or right margin.
  • replacement in source_text.lua at line 57
    [2.271][2.271:354]()
    if pos <= State.cursor1.pos and pos + frag_len >= State.cursor1.pos then
    [2.271]
    [3.242]
    if pos <= State.cursor1.pos and pos + frag_len > State.cursor1.pos then
  • replacement in source_text.lua at line 67
    [2.405][2.405:488]()
    if pos <= State.cursor1.pos and pos + frag_len >= State.cursor1.pos then
    [2.405]
    [3.626]
    if pos <= State.cursor1.pos and pos + frag_len > State.cursor1.pos then
    Text.draw_cursor(State, State.left+Text.x(screen_line, State.cursor1.pos-pos+1), y)
    elseif pos + frag_len == State.cursor1.pos then
    -- Show cursor at end of line.
    -- This place also catches end of wrapping screen lines. That doesn't seem worth distinguishing.
    -- It seems useful to see a cursor whether your eye is on the left or right margin.