summaryrefslogtreecommitdiffstats
path: root/ftplugin/latex-box/findmain.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ftplugin/latex-box/findmain.vim')
-rw-r--r--ftplugin/latex-box/findmain.vim10
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