Fix winfixbuf compatibility

This commit is contained in:
~hedy
2025-06-30 20:47:03 +08:00
parent 1208cf085e
commit 0eb9289ab3

View File

@@ -53,10 +53,12 @@ function View:setup_view(split_command)
utils.win_set_option(self.win, 'winhl', cfg.o.outline_window.winhl)
utils.win_set_option(self.win, 'linebreak', true) -- only has effect when wrap=true
utils.win_set_option(self.win, 'breakindent', true) -- only has effect when wrap=true
-- this setting pins the window to the buffer not allowing to open any other buffers
-- which helps to prevent situation when external pickers (e.g. telescope) opens file
-- in the outline window sidebar
-- this setting pins the window to the buffer not allowing to open any other
-- buffers, which helps to prevent situation when external pickers (e.g.
-- telescope) opens file in the outline window sidebar.
if vim.fn.exists('&winfixbuf') == 1 then
utils.win_set_option(self.win, 'winfixbuf', true)
end
-- Would be nice to use guides.markers.vertical as part of showbreak to keep
-- continuity of the tree UI, but there's currently no way to style the
-- color, apart from globally overriding hl-NonText, which will potentially