Revision: 1059
http://vim-latex.svn.sourceforge.net/vim-latex/?rev=1059&view=rev
Author: tmaas
Date: 2009-08-12 21:38:05 +0000 (Wed, 12 Aug 2009)
Log Message:
-----------
Fix filename handling with help from Alexander Stefanescu.
Modified Paths:
--------------
trunk/vimfiles/ftplugin/latex-suite/texproject.vim
Modified: trunk/vimfiles/ftplugin/latex-suite/texproject.vim
===================================================================
--- trunk/vimfiles/ftplugin/latex-suite/texproject.vim 2009-08-03 22:22:32 UTC (rev 1058)
+++ trunk/vimfiles/ftplugin/latex-suite/texproject.vim 2009-08-12 21:38:05 UTC (rev 1059)
@@ -7,7 +7,7 @@
" Description: Handling tex projects.
"=============================================================================
-let s:path = expand("<sfile>:p:h")
+let s:path = fnameescape(expand("<sfile>:p:h"))
command! -nargs=0 TProjectEdit :call <SID>Tex_ProjectEdit()
@@ -21,7 +21,7 @@
let file = expand("%:p")
let mainfname = Tex_GetMainFileName()
if glob(mainfname.'.latexmain') != ''
- exec 'split '.Tex_EscapeSpaces(mainfname.'.latexmain')
+ exec 'split '.fnameescape(mainfname.'.latexmain')
else
echohl WarningMsg
echomsg "Master file not found."
@@ -34,15 +34,15 @@
" Tex_ProjectLoad: loads the .latexmain file {{{
" Description: If a *.latexmain file exists, then sources it
function! Tex_ProjectLoad()
- let curd = getcwd()
- call Tex_CD(expand('%:p:h'))
+ let s:origdir = fnameescape(getcwd())
+ exe 'cd '.fnameescape(expand('%:p:h'))
if glob(Tex_GetMainFileName(':p').'.latexmain') != ''
call Tex_Debug("Tex_ProjectLoad: sourcing [".Tex_GetMainFileName().".latexmain]", "proj")
exec 'source 'fnameescape(.Tex_GetMainFileName().'.latexmain')
endif
- call Tex_CD(curd)
+ exe 'cd '.s:origdir
endfunction " }}}
augroup LatexSuite
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|