Skip to content

Commit 7afb06c

Browse files
committed
fix: autocomplete positioning on first char in line
1 parent 588e4d4 commit 7afb06c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/blink/cmp/windows/autocomplete.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function autocomplete.update_position(context)
103103

104104
-- place the window at the start col of the current text we're fuzzy matching against
105105
-- so the window doesnt move around as we type
106-
local col = context.bounds.start_col - cursor_col - 1
106+
local col = context.bounds.start_col - cursor_col - (context.bounds.start_col == 0 and 0 or 1)
107107

108108
-- detect if there's space above/below the cursor
109109
-- todo: should pick the largest space if both are false and limit height of the window

0 commit comments

Comments
 (0)