diff options
author | rxi <rxi@users.noreply.github.com> | 2020-09-19 13:04:19 +0100 |
---|---|---|
committer | rxi <rxi@users.noreply.github.com> | 2020-09-19 13:04:19 +0100 |
commit | 137d9dd282e46d3ecf22670537b853797bca7329 (patch) | |
tree | a888d5dc34b75b5fcbf75b51e057df98e58b875c /plugins/scale.lua | |
parent | 9772b3668c7ae1dd58090f31947a8e977d81da4d (diff) | |
download | lite-xl-plugins-137d9dd282e46d3ecf22670537b853797bca7329.tar.gz lite-xl-plugins-137d9dd282e46d3ecf22670537b853797bca7329.zip |
Fixed scale plugin breaking CommandView when changing scroll offsets
Diffstat (limited to 'plugins/scale.lua')
-rw-r--r-- | plugins/scale.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/scale.lua b/plugins/scale.lua index 6fbf076..5dfa699 100644 --- a/plugins/scale.lua +++ b/plugins/scale.lua @@ -5,6 +5,7 @@ local config = require "core.config" local keymap = require "core.keymap" local style = require "core.style" local RootView = require "core.rootview" +local CommandView = require "core.commandview" config.scale_mode = "code" config.scale_use_mousewheel = true @@ -46,7 +47,7 @@ local function set_scale(scale) local scrolls = {} for _, view in ipairs(core.root_view.root_node:get_children()) do local n = view:get_scrollable_size() - if n ~= math.huge then + if n ~= math.huge and not view:is(CommandView) then scrolls[view] = view.scroll.y / (n - view.size.y) end end |