We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b7fe1d commit 4e9d7caCopy full SHA for 4e9d7ca
lua/blink/cmp/windows/autocomplete.lua
@@ -104,7 +104,8 @@ function autocomplete.update_position(context)
104
local col = context.bounds.start_col - cursor_col - 1
105
106
-- detect if there's space above/below the cursor
107
- local is_space_below = screen_height - cursor_row - screen_scroll_range.start_line > height
+ -- todo: should pick the largest space if both are false and limit height of the window
108
+ local is_space_below = screen_height - (cursor_row - screen_scroll_range.start_line) >= height
109
local is_space_above = cursor_row - screen_scroll_range.start_line > height
110
111
-- default to the user's preference but attempt to use the other options
0 commit comments