mirror of
https://github.com/gryf/tagbar.git
synced 2025-12-18 03:50:26 +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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user