diff options
author | jgmdev <jgmdev@gmail.com> | 2022-10-25 20:09:43 -0400 |
---|---|---|
committer | jgmdev <jgmdev@gmail.com> | 2022-10-25 20:09:43 -0400 |
commit | c24cea177b7de6ae57178496ac04d73b0a9d22f3 (patch) | |
tree | 06ce0ec1b2721404c8fee87c2e0b22c37a5023cf /plugins/minimap.lua | |
parent | f50928df1436a99241a6815b5e2669af36996ab7 (diff) | |
download | lite-xl-plugins-c24cea177b7de6ae57178496ac04d73b0a9d22f3.tar.gz lite-xl-plugins-c24cea177b7de6ae57178496ac04d73b0a9d22f3.zip |
minimap: check docview has minimap scroll
Diffstat (limited to 'plugins/minimap.lua')
-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, ...) |