Fix #549: Ensure alternate buffer is untouched

Also fixed minor issue with bufwipeout.
This commit is contained in:
Karl Yngve Lervåg 2016-09-12 20:59:34 +02:00
parent be6d03b7cc
commit 02768f5bad
2 changed files with 11 additions and 4 deletions

View File

@ -167,7 +167,7 @@ function! s:actions_activate(close) dict "{{{1
endif
" Open file buffer
execute cmd bnr
execute 'keepalt' cmd bnr
" Go to entry line
call setpos('.', [0, entry.line, 0, 0])
@ -177,10 +177,12 @@ function! s:actions_activate(close) dict "{{{1
" Keep or close index window (based on options)
if a:close
if g:vimtex_index_resize
silent exe 'set columns -=' . g:vimtex_index_split_width
if bufexists(toc_bnr)
if g:vimtex_index_resize
silent exe 'set columns -=' . g:vimtex_index_split_width
endif
execute 'bwipeout ' . toc_bnr
endif
execute 'bwipeout ' . toc_bnr
else
execute toc_wnr . 'wincmd w'
endif

View File

@ -0,0 +1,5 @@
set nocompatible
let &rtp = '~/.vim/bundle/vimtex,' . &rtp
let &rtp .= ',~/.vim/bundle/vimtex/after'
filetype plugin indent on
syntax enable