Skip to content

Commit

Permalink
Fix wrong positioning of Vim popup
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasfaingnaert committed Jul 19, 2019
1 parent 7ed35dc commit 18fcb43
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions autoload/lsp/ui/vim/output.vim
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ function! s:align_preview(options) abort
if s:supports_floating && g:lsp_preview_float && !has('nvim')
" Vim popups
let l:pos = popup_getpos(s:winid)
let l:below = l:pos['core_line'] < winline()
let l:below = winline() < winheight(0) / 2
if l:below
let l:height = min([l:pos['core_height'], winheight(0) - winline() - 2])
else
Expand All @@ -247,7 +247,9 @@ function! s:align_preview(options) abort
\ 'minwidth': l:width,
\ 'maxwidth': l:width,
\ 'minheight': l:height,
\ 'maxheight': l:height
\ 'maxheight': l:height,
\ 'pos': l:below ? 'topleft' : 'botleft',
\ 'line': l:below ? 'cursor+1' : 'cursor-1'
\ }

if l:align ==? 'top'
Expand Down

0 comments on commit 18fcb43

Please sign in to comment.