From 132e67f214d20840e207da5703789f2f57c4845f Mon Sep 17 00:00:00 2001 From: cukmekerb Date: Sat, 11 Sep 2021 13:44:19 -0700 Subject: make minimap displace DocView --- plugins/minimap.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'plugins/minimap.lua') diff --git a/plugins/minimap.lua b/plugins/minimap.lua index c9e1c54..3f4a2a2 100644 --- a/plugins/minimap.lua +++ b/plugins/minimap.lua @@ -289,6 +289,13 @@ DocView.draw_scrollbar = function(self) end +local prev_update = DocView.update +DocView.update = function (self) + if not config.plugins.minimap.enabled then return prev_update(self) end + self.size.x = self.size.x - config.plugins.minimap.width * SCALE + return prev_update(self) +end + command.add(nil, { ["minimap:toggle-visibility"] = function() config.plugins.minimap.enabled = not config.plugins.minimap.enabled -- cgit v1.2.3