mirror of
https://github.com/gryf/tagbar.git
synced 2025-12-18 03:50:26 +01:00
Don't show errors when opening preview window (#810)
* Don't show errors when opening preview window (occurs when buffer has unsaved changes). * Update autoload/tagbar.vim Co-authored-by: David Hegland <darth.gerbil@gmail.com> Co-authored-by: David Hegland <darth.gerbil@gmail.com>
This commit is contained in:
@@ -2500,9 +2500,12 @@ function! s:ShowInPreviewWin() abort
|
||||
" Open the preview window if it is not already open. This has to be done
|
||||
" explicitly before the :psearch below to better control its positioning.
|
||||
if !pwin_open
|
||||
silent execute
|
||||
let l:confirm = &confirm
|
||||
let &confirm = 0
|
||||
silent! execute
|
||||
\ g:tagbar_previewwin_pos . ' pedit ' .
|
||||
\ fnameescape(taginfo.fileinfo.fpath)
|
||||
let &confirm = l:confirm
|
||||
if g:tagbar_position !~# 'vertical'
|
||||
silent execute 'vertical resize ' . g:tagbar_width
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user