Made moving to a line beyond the end of a document move the caret column to the end of the line
This commit is contained in:
parent
807d7a07fe
commit
b3278f6360
|
@ -29,6 +29,9 @@ DocView.translate = {
|
||||||
end,
|
end,
|
||||||
|
|
||||||
["next_page"] = function(doc, line, col, dv)
|
["next_page"] = function(doc, line, col, dv)
|
||||||
|
if line == #doc.lines then
|
||||||
|
return #doc.lines, #doc.lines[line]
|
||||||
|
end
|
||||||
local min, max = dv:get_visible_line_range()
|
local min, max = dv:get_visible_line_range()
|
||||||
return line + (max - min), 1
|
return line + (max - min), 1
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in New Issue