From a39f44e72d91dd65377cabbe907032fa27fbba2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Thu, 26 Dec 2013 12:19:53 +0100 Subject: [PATCH] Added simple file readable check --- autoload/latex.vim | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/autoload/latex.vim b/autoload/latex.vim index bd9de31..264acf8 100644 --- a/autoload/latex.vim +++ b/autoload/latex.vim @@ -238,6 +238,13 @@ endfunction " {{{1 s:get_main_recurse function! s:get_main_recurse(file) + " + " Check if file is readable + " + if !filereadable(a:file) + return 0 + endif + " " Check if current file is a main file "