show 2 cursors when straddling a wrapping line

This commit is contained in:
Kartik K. Agaram 2024-09-15 11:21:39 -07:00
parent 2b1fc7746d
commit d0491d11c2
1 changed files with 2 additions and 2 deletions

View File

@ -559,7 +559,7 @@ function Text.get_rect(editor, loc)
table.insert(curr_screen_line,
{x=x, y=y, dx=w, dy=editor.line_height, pos=pos, data=char, show_cursor=true}) -- char
table.insert(curr_screen_line,
{x=x+w, y=y, dx=editor.width-x-w, dy=editor.line_height, pos=pos+1}) -- filler
{x=x+w, y=y, dx=editor.width-x-w, dy=editor.line_height, pos=pos+1, show_cursor=true}) -- filler
table.insert(screen_lines,
{x=0, y=y, dx=editor.width, dy=editor.line_height,
pos=spos, dpos=pos-spos+1, char_rects=curr_screen_line})
@ -579,7 +579,7 @@ function Text.get_rect(editor, loc)
if x+w > editor.width then
assert(pos > 1)
table.insert(curr_screen_line,
{x=x, y=y, dx=editor.width-x, dy=editor.line_height, pos=pos}) -- filler
{x=x, y=y, dx=editor.width-x, dy=editor.line_height, pos=pos, show_cursor=true}) -- filler
table.insert(screen_lines,
{x=0, y=y, dx=editor.width, dy=editor.line_height,
pos=spos, dpos=(pos-1)-spos+1, char_rects=curr_screen_line})