fix(which_key): increase zindex for popup window (#3046)

This commit is contained in:
Mohamad Sulton Hasanuddin
2024-04-16 06:46:49 +07:00
committed by GitHub
parent 4d4ade7f2b
commit a3284957d3
2 changed files with 3 additions and 0 deletions

View File

@@ -1245,6 +1245,7 @@ actions.which_key = function(prompt_bufnr, opts)
if type(opts.winblend) == "function" then
opts.winblend = opts.winblend()
end
opts.zindex = vim.F.if_nil(opts.zindex, 100)
opts.column_padding = vim.F.if_nil(opts.column_padding, " ")
-- Assigning into 'opts.column_indent' would override a number with a string and
@@ -1363,6 +1364,7 @@ actions.which_key = function(prompt_bufnr, opts)
borderchars = { prompt_pos and "" or " ", "", not prompt_pos and "" or " ", "", "", "", "", "" },
noautocmd = true,
title = { { text = title_text, pos = prompt_pos and "N" or "S" } },
zindex = opts.zindex,
}
local km_win_id, km_opts = popup.create("", popup_opts)
local km_buf = a.nvim_win_get_buf(km_win_id)