Skip to content

Commit 183468f

Browse files
committed
Issue #139 fix is not necessary after Neovim #30259
1 parent 4d60c59 commit 183468f

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

lua/scrollview.lua

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,9 +1444,10 @@ local show_scrollbar = function(winid, bar_winid)
14441444
zindex = zindex
14451445
}
14461446
-- Create a new window if one is not available for re-use. Also, create a new
1447-
-- window if the base window is a floating window, to avoid a z-index issue.
1448-
-- #139
1449-
if bar_winid == -1 or is_float then
1447+
-- window if the base window is a floating window, to avoid Neovim Issue #18142,
1448+
-- a z-index issue (#139) that was fixed in Neovim PR #30259.
1449+
local issue_18142 = is_float and not to_bool(fn.has('nvim-0.11'))
1450+
if bar_winid == -1 or issue_18142 then
14501451
bar_winid = api.nvim_open_win(bar_bufnr, false, bar_config)
14511452
else
14521453
api.nvim_win_set_config(bar_winid, bar_config)
@@ -1773,9 +1774,10 @@ local show_signs = function(winid, sign_winids, bar_winid)
17731774
zindex = zindex,
17741775
}
17751776
-- Create a new window if none are available for re-use. Also, create a
1776-
-- new window if the base window is a floating window, to avoid a
1777-
-- z-index issue. #139
1778-
if vim.tbl_isempty(sign_winids) or is_float then
1777+
-- new window if the base window is a floating window, to avoid Neovim
1778+
-- Issue #18142, a z-index issue (#139) that was fixed in Neovim PR #30259.
1779+
local issue_18142 = is_float and not to_bool(fn.has('nvim-0.11'))
1780+
if vim.tbl_isempty(sign_winids) or issue_18142 then
17791781
sign_winid = api.nvim_open_win(sign_bufnr, false, sign_config)
17801782
else
17811783
sign_winid = table.remove(sign_winids)

0 commit comments

Comments
 (0)