Add option to disable scrolling past the end (#566)
This commit is contained in:
committed by
Francesco Abbate
parent
b0b3485152
commit
f6b9d9ab67
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user