Skip to content

Commit 3bf0254

Browse files
committed
Fix checking enough space for floating window
1 parent c824025 commit 3bf0254

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

autoload/LanguageClient.vim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,8 @@ function! s:OpenHoverPreview(bufname, lines, filetype) abort
320320

321321
" Calculate anchor
322322
" Prefer North, but if there is no space, fallback into South
323-
if pos[1] + height <= &lines
323+
let bottom_line = line('w0') + winheight() - 1
324+
if pos[1] + height <= bottom_line
324325
let vert = 'N'
325326
let row = 1
326327
else

0 commit comments

Comments
 (0)