summaryrefslogtreecommitdiffstats
path: root/ftplugin/latextoc.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2014-06-08 13:18:33 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2014-06-08 13:18:33 +0200
commit45273d44d4b1bd9a1be431c1a98f9046ed3a5c79 (patch)
tree7b8fa566b3da949b422804c3bb9eaf9c51b9b69e /ftplugin/latextoc.vim
parente961fa80374369c9e299b333639db0dc43d1f126 (diff)
downloadvim-polyglot-45273d44d4b1bd9a1be431c1a98f9046ed3a5c79.tar.gz
vim-polyglot-45273d44d4b1bd9a1be431c1a98f9046ed3a5c79.zip
Major update
Diffstat (limited to 'ftplugin/latextoc.vim')
-rw-r--r--ftplugin/latextoc.vim5
1 files changed, 4 insertions, 1 deletions
diff --git a/ftplugin/latextoc.vim b/ftplugin/latextoc.vim
index 01fd9bb0..d5d7e58c 100644
--- a/ftplugin/latextoc.vim
+++ b/ftplugin/latextoc.vim
@@ -97,6 +97,10 @@ endfunction
" {{{2 TOCFindMatch
function! s:TOCFindMatch(strsearch,duplicates,files)
+ if len(a:files) == 0
+ echoerr "Could not find: " . a:strsearch
+ return
+ endif
call s:TOCOpenBuf(a:files[0])
let dups = a:duplicates
@@ -116,7 +120,6 @@ function! s:TOCFindMatch(strsearch,duplicates,files)
endif
call s:TOCFindMatch(a:strsearch,dups,a:files[1:])
-
endfunction
" {{{2 TOCFoldLevel