scenario:
Before this commit the word would be highlighted twice:
Now it shows up at the right place.
LGEY6A426OSCYPR5Y656VSVESXDTY73BBGHFPGLGOSTCUXKOIQIQC
if pos <= State.cursor1.pos and pos + frag_len >= State.cursor1.pos then
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.
if pos <= State.cursor1.pos and pos + frag_len >= State.cursor1.pos then
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.