Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

texviewer: escape more filenames with fnameescape

- Bibtex \cite{<F9>-completion failed when the path contains special chars like
  spaces
- fnameescape was added to other places to fix more unknown issues
  • Loading branch information...
commit 7b32b2ce9b9bd949843a863ce07cf3c881d41b4d 1 parent b92b30f
tmaas authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 vimfiles/ftplugin/latex-suite/texviewer.vim
View
8 vimfiles/ftplugin/latex-suite/texviewer.vim
@@ -526,7 +526,7 @@ function! Tex_GrepHelper(prefix, what)
if mainfname == expand('%:p')
split
else
- exec 'split '.Tex_EscapeSpaces(mainfname)
+ exec 'split '.fnameescape(mainfname)
endif
let pos = Tex_GetPos()
@@ -770,7 +770,7 @@ function! Tex_StartOutlineCompletion()
if has('python') && Tex_GetVarValue('Tex_UsePython')
exec 'python retval = outline.main('
- \. 'r"' . fnamemodify(mainfname, ':p') . '", '
+ \. 'r"' . fnameescape(fnamemodify(mainfname, ':p')) . '", '
\. 'r"' . s:prefix . '")'
" transfer variable from python to a local variable.
@@ -778,7 +778,7 @@ function! Tex_StartOutlineCompletion()
0put!=retval
else
- exec '0r!'.shellescape(s:path.'/outline.py').' '.mainfname.' '.s:prefix
+ exec '0r!'.shellescape(s:path.'/outline.py').' '.fnameescape(mainfname).' '.s:prefix
endif
0
@@ -846,7 +846,7 @@ function! Tex_FindBibFiles()
let mainfname = Tex_GetMainFileName(':p')
wincmd n
- exec 'silent! e '.mainfname
+ exec 'silent! e '.fnameescape(mainfname)
if search('\\\(no\)\?bibliography{', 'w')
Please sign in to comment.
Something went wrong with that request. Please try again.