In vim configured without python, Tex_CatFile() checks for readfile() incorrectly and overwrites the unnamed register at each compile. The following changes fix this check.
--- a/ftplugin/latex-suite/main.vim
+++ b/ftplugin/latex-suite/main.vim
@@ -948,9 +948,12 @@
endfunction
endif " }}}
" Tex_CatFile: returns the contents of a file in a <NL> seperated string {{{
-if has('*readfile')
+if exists('*readfile')
function! Tex_CatFile(filename)
- return join(readfile(filename), "\n")
+ if glob(a:filename) == ''
+ return ''
+ endif
+ return join(readfile(a:filename), "\n")
endfunction
elseif has('python') && g:Tex_UsePython
function! Tex_CatFile(filename)
In vim configured without python, Tex_CatFile() checks for readfile() incorrectly and overwrites the unnamed register at each compile. The following changes fix this check.