fix(which_key): increase zindex for popup window (#3046)
This commit is contained in:
committed by
GitHub
parent
4d4ade7f2b
commit
a3284957d3
@@ -52,6 +52,7 @@ local action_generate = {}
|
||||
---@field normal_hl string: winhl of "Normal" for keymap hints floating window (default: "TelescopePrompt")
|
||||
---@field border_hl string: winhl of "Normal" for keymap borders (default: "TelescopePromptBorder")
|
||||
---@field winblend number: pseudo-transparency of keymap hints floating window
|
||||
---@field zindex number: z-index of keymap hints floating window (default: 100)
|
||||
action_generate.which_key = function(opts)
|
||||
local which_key = function(prompt_bufnr)
|
||||
actions.which_key(prompt_bufnr, opts)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user