Make `linewrapping` consider the expanded `Scrollbar` size
This avoids reflowing the text when hovering the scrollbar.
This commit is contained in:
parent
a9934c08d9
commit
784b911d41
|
@ -219,7 +219,7 @@ function LineWrapping.draw_guide(docview)
|
|||
end
|
||||
|
||||
function LineWrapping.update_docview_breaks(docview)
|
||||
local x,y,w,h = docview.v_scrollbar:get_thumb_rect()
|
||||
local w = docview.v_scrollbar.expanded_size or style.expanded_scrollbar_size
|
||||
local width = (type(config.plugins.linewrapping.width_override) == "function" and config.plugins.linewrapping.width_override(docview))
|
||||
or config.plugins.linewrapping.width_override or (docview.size.x - docview:get_gutter_width() - w)
|
||||
if (not docview.wrapped_settings or docview.wrapped_settings.width == nil or width ~= docview.wrapped_settings.width) then
|
||||
|
|
Loading…
Reference in New Issue