mirror of
https://github.com/neovim/neovim
synced 2025-07-28 09:21:58 +00:00
fix(lsp): cycling signatures with the default config.focusable
(cherry picked from commit 342974773c
)
This commit is contained in:
committed by
github-actions[bot]
parent
95f96a3d1b
commit
478f5d0070
@ -370,7 +370,7 @@ function M.signature_help(config)
|
|||||||
|
|
||||||
local ft = vim.bo[ctx.bufnr].filetype
|
local ft = vim.bo[ctx.bufnr].filetype
|
||||||
local total = #signatures
|
local total = #signatures
|
||||||
local can_cycle = total > 1 and config.focusable
|
local can_cycle = total > 1 and config.focusable ~= false
|
||||||
local idx = active_signature - 1
|
local idx = active_signature - 1
|
||||||
|
|
||||||
--- @param update_win? integer
|
--- @param update_win? integer
|
||||||
@ -386,7 +386,9 @@ function M.signature_help(config)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local sfx = can_cycle and string.format(' (%d/%d) (<C-s> to cycle)', idx, total) or ''
|
local sfx = total > 1
|
||||||
|
and string.format(' (%d/%d)%s', idx, total, can_cycle and ' (<C-s> to cycle)' or '')
|
||||||
|
or ''
|
||||||
local title = string.format('Signature Help: %s%s', client.name, sfx)
|
local title = string.format('Signature Help: %s%s', client.name, sfx)
|
||||||
if config.border then
|
if config.border then
|
||||||
config.title = title
|
config.title = title
|
||||||
|
Reference in New Issue
Block a user