Add option to disable scrolling past the end (#566)

This commit is contained in:
Guldoman
2021-09-30 13:10:38 -07:00
committed by GitHub
parent cf11d67895
commit ab0ca031fa
2 changed files with 4 additions and 0 deletions
+3
View File
@@ -98,6 +98,9 @@ end
function DocView:get_scrollable_size()
if not config.scroll_past_end then
return self:get_line_height() * (#self.doc.lines) + style.padding.y * 2
end
return self:get_line_height() * (#self.doc.lines - 1) + self.size.y
end