Set horizontal scroll size to be more in line with other editors

Only scroll enough to see the whole line.
This commit is contained in:
Guldoman
2021-08-30 17:58:22 +02:00
committed by Francesco
parent 2d33fdc656
commit 4a03aec073
+4 -2
View File
@@ -104,8 +104,10 @@ function DocView:get_scrollable_size()
long_line = l long_line = l
break break
end end
return self:get_line_height() * (#self.doc.lines - 1) + self.size.y, local size_v = self:get_line_height() * (#self.doc.lines - 1) + self.size.y
self:get_col_x_offset(long_line, self.doc.long_lines.length) + self.size.x - xmargin local size_h = self:get_col_x_offset(long_line, self.doc.long_lines.length)
+ self.size.x - (self.size.x - self:get_gutter_width()) + xmargin
return size_v, size_h
end end