Skip to content

Commit

Permalink
fix(signature): show signature in correct window. Fixes #593
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Oct 13, 2023
1 parent 7ed897d commit 2f0993e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/noice/lsp/signature.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ function M.setup()
end

function M.get_char(buf)
local win = vim.fn.bufwinid(buf)
local current_win = vim.api.nvim_get_current_win()
local win = buf == vim.api.nvim_win_get_buf(current_win) and current_win or vim.fn.bufwinid(buf)
local cursor = vim.api.nvim_win_get_cursor(win == -1 and 0 or win)
local row = cursor[1] - 1
local col = cursor[2]
Expand Down

0 comments on commit 2f0993e

Please sign in to comment.