diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/minimap.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/minimap.lua b/plugins/minimap.lua index f55b213..9b5a26a 100644 --- a/plugins/minimap.lua +++ b/plugins/minimap.lua @@ -608,7 +608,13 @@ end local old_docview_scroll_to_make_visible = DocView.scroll_to_make_visible function DocView:scroll_to_make_visible(line, col, ...) - if not self:is(DocView) and self.v_scrollbar:is_minimap_enabled() then return old_docview_scroll_to_make_visible(self, line, col, ...) end + if + not self:is(DocView) or not self.v_scrollbar:is(MiniMap) + or + not self.v_scrollbar:is_minimap_enabled() + then + return old_docview_scroll_to_make_visible(self, line, col, ...) + end local old_size = self.size.x self.size.x = math.max(0, self.size.x - config.plugins.minimap.width) local result = old_docview_scroll_to_make_visible(self, line, col, ...) |