bugfix: handle cursor past end of line
This commit is contained in:
parent
208cc02ed8
commit
99b04ae3c4
2
move.lua
2
move.lua
|
@ -282,7 +282,7 @@ function edit.to_coord(editor, loc) -- scans
|
|||
-- text
|
||||
for _,s in ipairs(rect.screen_line_rects) do
|
||||
for _,c in ipairs(s.char_rects) do
|
||||
if c.pos == loc.pos and c.data then
|
||||
if c.pos == loc.pos and (c.data or c.pos == utf8.len(line.data)+1) then
|
||||
return editor.left + c.x, y + c.y
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue