aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/settings.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/plugins/settings.lua b/plugins/settings.lua
index 89796b1..6637a81 100644
--- a/plugins/settings.lua
+++ b/plugins/settings.lua
@@ -5,6 +5,7 @@ local common = require "core.common"
local command = require "core.command"
local keymap = require "core.keymap"
local style = require "core.style"
+local View = require "core.view"
local DocView = require "core.docview"
-- check if widget is installed before proceeding
@@ -1921,5 +1922,21 @@ if config.plugins.toolbarview ~= false then
end
end
+--------------------------------------------------------------------------------
+-- Overwrite View:new to allow setting force scrollbar status globally
+--------------------------------------------------------------------------------
+local view_new = View.new
+function View:new()
+ view_new(self)
+ local mode = config.force_scrollbar_status_mode or "global"
+ local globally = mode == "global"
+ if globally then
+ --This is delayed to allow widgets to also apply it to child views/widgets
+ core.add_thread(function()
+ self.v_scrollbar:set_forced_status(config.force_scrollbar_status)
+ self.h_scrollbar:set_forced_status(config.force_scrollbar_status)
+ end)
+ end
+end
return settings;