Skip to content

Commit

Permalink
fix(which_key): increase zindex for popup window (#3046)
Browse files Browse the repository at this point in the history
(cherry picked from commit a328495)
  • Loading branch information
shcode authored and Conni2461 committed May 20, 2024
1 parent 7ea9ae5 commit 93bd73e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions lua/telescope/actions/generate.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions lua/telescope/actions/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,7 @@ actions.which_key = function(prompt_bufnr, opts)
opts.normal_hl = vim.F.if_nil(opts.normal_hl, "TelescopePrompt")
opts.border_hl = vim.F.if_nil(opts.border_hl, "TelescopePromptBorder")
opts.winblend = vim.F.if_nil(opts.winblend, conf.winblend)
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
Expand Down Expand Up @@ -1220,6 +1221,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)
Expand Down

0 comments on commit 93bd73e

Please sign in to comment.