bugfix: cursor past end of screen line
This commit is contained in:
parent
e2b371ea37
commit
a7c7fd6bce
2
text.lua
2
text.lua
|
@ -302,7 +302,7 @@ function Text.move_cursor(line_index, line, mx, my)
|
||||||
-- line position cursor on final character of screen line.
|
-- line position cursor on final character of screen line.
|
||||||
-- (The final screen line positions past end of screen line as always.)
|
-- (The final screen line positions past end of screen line as always.)
|
||||||
if mx > Line_width and screen_line_index < #line.screen_line_starting_pos then
|
if mx > Line_width and screen_line_index < #line.screen_line_starting_pos then
|
||||||
Cursor_pos = line.screen_line_starting_pos[screen_line_index+1] - 1
|
Cursor_pos = line.screen_line_starting_pos[screen_line_index+1]
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local s = string.sub(line.data, screen_line_starting_pos)
|
local s = string.sub(line.data, screen_line_starting_pos)
|
||||||
|
|
Loading…
Reference in New Issue