From 137d9dd282e46d3ecf22670537b853797bca7329 Mon Sep 17 00:00:00 2001 From: rxi Date: Sat, 19 Sep 2020 13:04:19 +0100 Subject: Fixed scale plugin breaking CommandView when changing scroll offsets --- plugins/scale.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins') 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 -- cgit v1.2.3