diff options
author | cukmekerb <cukmekerb@gmail.com> | 2021-09-11 13:44:19 -0700 |
---|---|---|
committer | cukmekerb <cukmekerb@gmail.com> | 2021-09-11 13:44:19 -0700 |
commit | 132e67f214d20840e207da5703789f2f57c4845f (patch) | |
tree | 92484be9c443c2ca27cdfc1d7645364f5dedfcb5 /plugins | |
parent | 43f8837c52680e0e502c0a0d3f6f243e930f34af (diff) | |
download | lite-xl-plugins-132e67f214d20840e207da5703789f2f57c4845f.tar.gz lite-xl-plugins-132e67f214d20840e207da5703789f2f57c4845f.zip |
make minimap displace DocView
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/language_toml.lua | 2 | ||||
-rw-r--r-- | plugins/minimap.lua | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/plugins/language_toml.lua b/plugins/language_toml.lua index 9de31f9..3774dfb 100644 --- a/plugins/language_toml.lua +++ b/plugins/language_toml.lua @@ -1,4 +1,4 @@ --- lite-xl 1.16 +-- mod-version:2 local syntax = require "core.syntax" 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 |