Add warning if ToC opened from bib first (#520)

This commit is contained in:
Karl Yngve Lervåg 2016-08-10 20:23:27 +02:00
parent 5f5b147d78
commit fe4e9a4eb4

View File

@ -37,6 +37,10 @@ function! vimtex#toc#open() " {{{1
if !exists('b:vimtex')
if exists('s:index')
call vimtex#index#create(s:index)
elseif expand('%:e') =~# 'bib'
call vimtex#echo#warning('Can''t open ToC!')
call vimtex#echo#echo('Please open ToC from a relevant tex file first.')
call vimtex#echo#wait()
endif
return
endif