Skip to content

Commit 2237213

Browse files
andymasstyll
andymass
authored andcommitted
Fix: Correct check for *readline.
Fixes gerw/vim-latex-suite#6
1 parent 05f3232 commit 2237213

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ftplugin/latex-suite/main.vim

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -971,9 +971,12 @@ else
971971
endfunction
972972
endif " }}}
973973
" Tex_CatFile: returns the contents of a file in a <NL> seperated string {{{
974-
if has('*readfile')
974+
if exists('*readfile')
975975
function! Tex_CatFile(filename)
976-
return join(readfile(filename), "\n")
976+
if glob(a:filename) == ''
977+
return ''
978+
endif
979+
return join(readfile(a:filename), "\n")
977980
endfunction
978981
elseif has('python') && g:Tex_UsePython
979982
function! Tex_CatFile(filename)

0 commit comments

Comments
 (0)