Skip to content

Commit

Permalink
fix: consider the border when calculating the width of the documentat…
Browse files Browse the repository at this point in the history
…ion window
  • Loading branch information
ofseed committed Nov 13, 2024
1 parent b2c955e commit 1186614
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/blink/cmp/windows/lib/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -299,12 +299,12 @@ function win:get_direction_with_window_constraints(anchor_win, direction_priorit
e = {
vertical = anchor_is_above_cursor and cursor_constraints.distance_from_top
or cursor_constraints.distance_from_bottom,
horizontal = screen_width - (anchor_col - 1) - anchor_width,
horizontal = screen_width - (anchor_col - 1) - anchor_width - anchor_border_size.right,
},
w = {
vertical = anchor_is_above_cursor and cursor_constraints.distance_from_top
or cursor_constraints.distance_from_bottom,
horizontal = anchor_col - 1,
horizontal = anchor_col - 1 + anchor_border_size.left,
},
}

Expand Down

0 comments on commit 1186614

Please sign in to comment.