Skip to content

Commit 309e9e5

Browse files
authored
Fix floating window on neovim (#1346)
1 parent eb542a3 commit 309e9e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autoload/lsp/internal/completion/documentation.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ function! s:show_floating_window(event, managed_user_data) abort
109109
\ 'maxwidth': float2nr(&columns * 0.4),
110110
\ 'maxheight': float2nr(&lines * 0.4),
111111
\ })
112-
let l:margin_right = &columns - 1 - (a:event.col + a:event.width + 1 + (a:event.scrollbar ? 1 : 0))
113-
let l:margin_left = a:event.col - 3
112+
let l:margin_right = &columns - 1 - (float2nr(a:event.col) + float2nr(a:event.width) + 1 + (a:event.scrollbar ? 1 : 0))
113+
let l:margin_left = float2nr(a:event.col) - 3
114114
if l:size.width < l:margin_right
115115
" do nothing
116116
elseif l:margin_left <= l:margin_right

0 commit comments

Comments
 (0)