Skip to content

Commit

Permalink
fix: signature window no longer overlaps cursor (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
nic-gaffney authored Oct 22, 2024
1 parent 63b7b22 commit 7d6b50b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/blink/cmp/windows/signature.lua
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ function signature.update_position(context)
local is_space_below = cursor_screen_position.distance_from_bottom > height
local is_space_above = cursor_screen_position.distance_from_top > height

-- fixes issue where the signature window would cover the cursor
if is_space_above then direction = 'n' else direction = 's' end

-- default to the user's preference but attempt to use the other options
local row = direction == 's' and 1 or -height
vim.api.nvim_win_set_config(winnr, { relative = 'cursor', row = row, col = -1 })
Expand Down

0 comments on commit 7d6b50b

Please sign in to comment.