File tree 1 file changed +9
-0
lines changed
lua/blink/cmp/windows/lib
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 238
238
239
239
function win :get_direction_with_window_constraints (anchor_win , direction_priority )
240
240
local cursor_constraints = self .get_cursor_screen_position ()
241
+
241
242
local anchor_config = vim .fn .screenpos (anchor_win :get_win (), 1 , 1 )
243
+ -- hack: sometimes vin.fn.screenpos returns 0,0
244
+ -- https://github.com/neovim/neovim/pull/30681
245
+ if anchor_config .row == 0 and anchor_config .col == 0 then
246
+ local row , col = unpack (vim .fn .win_screenpos (anchor_win :get_win ()))
247
+ anchor_config .row = row
248
+ anchor_config .col = col
249
+ end
250
+
242
251
local anchor_border_size = anchor_win :get_border_size ()
243
252
local anchor_col = anchor_config .col - anchor_border_size .left
244
253
local anchor_row = anchor_config .row - anchor_border_size .top
You can’t perform that action at this time.
0 commit comments