Merge pull request #1002 from zesterer/master

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:
Jefferson González 2022-05-30 10:43:43 -04:00 committed by GitHub
commit a71bc8af35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -29,6 +29,9 @@ DocView.translate = {
end,
["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()
return line + (max - min), 1
end,