Skip to content

Commit

Permalink
fix: column alignment off by 1 when bounds length == 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Saghen committed Jan 3, 2025
1 parent f7857fc commit 0d162bd
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lua/blink/cmp/completion/windows/menu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,7 @@ function menu.update_position()
else
local cursor_col = context.get_cursor()[2]

local col = context.bounds.start_col
- alignment_start_col
- cursor_col
- (context.bounds.length == 0 and 0 or 1)
- border_size.left
local col = context.bounds.start_col - alignment_start_col - cursor_col - 1 - border_size.left
if config.draw.align_to == 'cursor' then col = 0 end

win:set_win_config({ relative = 'cursor', row = row, col = col })
Expand Down

0 comments on commit 0d162bd

Please sign in to comment.