diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2014-07-29 13:03:49 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2014-07-29 13:03:49 +0200 |
commit | 5f1223fbc5285689db812236c9100329740a805b (patch) | |
tree | 58bc6f11540011afb25826c96f65fa35f5687291 /ftplugin/latex-box/findmain.vim | |
parent | a59f644d49ee029df48586a6c3c358858f1e6739 (diff) | |
download | vim-polyglot-1.9.2.tar.gz vim-polyglot-1.9.2.zip |
Major updatev1.9.2
Diffstat (limited to 'ftplugin/latex-box/findmain.vim')
-rw-r--r-- | ftplugin/latex-box/findmain.vim | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/ftplugin/latex-box/findmain.vim b/ftplugin/latex-box/findmain.vim index 0b9c404f..622c408f 100644 --- a/ftplugin/latex-box/findmain.vim +++ b/ftplugin/latex-box/findmain.vim @@ -1,4 +1,4 @@ -" Tex_GetMainFileName: gets the name of the main file being compiled. {{{ +" LatexBox_GetMainFileName: gets the name of the main file being compiled. {{{ " Description: returns the full path name of the main file. " This function checks for the existence of a .latexmain file " which might point to the location of a "main" latex file. @@ -13,7 +13,8 @@ " NOTE: From version 1.6 onwards, this function always trims " away the .latexmain part of the file name before applying the " modifier argument. -function! Tex_GetMainFileName(...) +" NOTE: This function is copied from the Latex-Suite project! +function! LatexBox_GetMainFileName(...) if a:0 > 0 let modifier = a:1 else @@ -51,10 +52,7 @@ function! Tex_GetMainFileName(...) let lheadfile = expand('%'.modifier) endif - if lheadfile !~ '\.tex$' - let lheadfile .= '.tex' - endif - exe 'cd '.s:origdir + exe 'cd '.s:origdir " NOTE: The caller of this function needs to escape the file name with " fnameescape() . The reason its not done here is that escaping is not |