Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix checking enough space for floating window
  • Loading branch information
rhysd committed Mar 14, 2019
commit 5ccf450118b7259b09362ed80b034757c14f4dff
7 changes: 4 additions & 3 deletions autoload/LanguageClient.vim
Original file line number Diff line number Diff line change
Expand Up @@ -271,15 +271,15 @@ function! s:CloseFloatingHoverAfterCursorMove(win_id, opened) abort
endif
autocmd! plugin-LC-neovim-close-hover
let winnr = win_id2win(a:win_id)
if winnr == -1
if winnr == 0
return
endif
execute winnr . 'wincmd c'
endfunction

function! s:CloseFloatingHoverAfterEnterAnotherWin(win_id) abort
let winnr = win_id2win(a:win_id)
if winnr == -1
if winnr == 0
" Float window was already closed
autocmd! plugin-LC-neovim-close-hover
return
Expand Down Expand Up @@ -320,7 +320,8 @@ function! s:OpenHoverPreview(bufname, lines, filetype) abort

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