Skip to content

Commit

Permalink
linewrapping: Disable horizontal scrolling when enabled (lite-xl#1309)
Browse files Browse the repository at this point in the history
  • Loading branch information
Guldoman authored Jan 5, 2023
1 parent 6c6e5e9 commit 385ee69
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions data/plugins/linewrapping.lua
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,12 @@ function DocView:get_scrollable_size()
return self:get_line_height() * (get_total_wrapped_lines(self) - 1) + self.size.y
end

local old_get_h_scrollable_size = DocView.get_h_scrollable_size
function DocView:get_h_scrollable_size(...)
if self.wrapping_enabled then return 0 end
return old_get_h_scrollable_size(self, ...)
end

local old_new = DocView.new
function DocView:new(doc)
old_new(self, doc)
Expand Down

0 comments on commit 385ee69

Please sign in to comment.