1
0
mirror of https://github.com/gryf/tagbar.git synced 2025-12-18 12:00:23 +01:00

Resize window after opening, ref #246

This prevents an incorrect window size from being used in some edge
cases.
This commit is contained in:
Jan Larres
2016-11-05 19:20:22 +13:00
parent 3d208115fb
commit e212be6a12

View File

@@ -1884,13 +1884,16 @@ function! s:OpenWindow(flags) abort
let s:window_opening = 1
if g:tagbar_vertical == 0
let openpos = g:tagbar_left ? 'topleft vertical ' : 'botright vertical '
let mode = 'vertical '
let openpos = g:tagbar_left ? 'topleft ' : 'botright '
let width = g:tagbar_width
else
let mode = ''
let openpos = g:tagbar_left ? 'leftabove ' : 'rightbelow '
let width = g:tagbar_vertical
endif
exe 'silent keepalt ' . openpos . width . 'split ' . s:TagbarBufName()
exe 'silent keepalt ' . openpos . mode . width . 'split ' . s:TagbarBufName()
exe 'silent ' . mode . 'resize ' . width
unlet s:window_opening
call s:InitWindow(autoclose)