Skip to content

Commit 59e108e

Browse files
authored
Workaround for float position. (#1405)
Signed-off-by: Gabriel Linder <[email protected]> Signed-off-by: Gabriel Linder <[email protected]>
1 parent be675ff commit 59e108e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autoload/lsp/internal/document_hover/under_cursor.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,8 @@ endfunction
263263
function! s:compute_position(size) abort
264264
let l:pos = screenpos(0, line('.'), col('.'))
265265
if l:pos.row == 0 && l:pos.col == 0
266-
" When the specified position is not visible
267-
return []
266+
" workaround for float position
267+
let l:pos = {'curscol': wincol(), 'row': winline()}
268268
endif
269269
let l:pos = [l:pos.row + 1, l:pos.curscol + 1]
270270
if l:pos[0] + a:size.height > &lines

0 commit comments

Comments
 (0)