Skip to content

Commit

Permalink
Issue #139 fix is not necessary after Neovim #30259
Browse files Browse the repository at this point in the history
  • Loading branch information
dstein64 committed Dec 12, 2024
1 parent 4d60c59 commit 183468f
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lua/scrollview.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1444,9 +1444,10 @@ local show_scrollbar = function(winid, bar_winid)
zindex = zindex
}
-- Create a new window if one is not available for re-use. Also, create a new
-- window if the base window is a floating window, to avoid a z-index issue.
-- #139
if bar_winid == -1 or is_float then
-- window if the base window is a floating window, to avoid Neovim Issue #18142,
-- a z-index issue (#139) that was fixed in Neovim PR #30259.
local issue_18142 = is_float and not to_bool(fn.has('nvim-0.11'))
if bar_winid == -1 or issue_18142 then
bar_winid = api.nvim_open_win(bar_bufnr, false, bar_config)
else
api.nvim_win_set_config(bar_winid, bar_config)
Expand Down Expand Up @@ -1773,9 +1774,10 @@ local show_signs = function(winid, sign_winids, bar_winid)
zindex = zindex,
}
-- Create a new window if none are available for re-use. Also, create a
-- new window if the base window is a floating window, to avoid a
-- z-index issue. #139
if vim.tbl_isempty(sign_winids) or is_float then
-- new window if the base window is a floating window, to avoid Neovim
-- Issue #18142, a z-index issue (#139) that was fixed in Neovim PR #30259.
local issue_18142 = is_float and not to_bool(fn.has('nvim-0.11'))
if vim.tbl_isempty(sign_winids) or issue_18142 then
sign_winid = api.nvim_open_win(sign_bufnr, false, sign_config)
else
sign_winid = table.remove(sign_winids)
Expand Down

0 comments on commit 183468f

Please sign in to comment.