#22 includegraphics and psfig filename completion doesn't work

open
nobody
None
5
2010-12-14
2010-12-14
Anonymous
No

The bug described below with patch has not be fixed as a result filename completion for psfig and includegraphics is broken:
http://www.mail-archive.com/vim-latex-devel@lists.sourceforge.net/msg00505.html

Additional bug is on line 145

+ elseif exists("s:type") && (s:type == 'includegraphics' || s:type == 'psfig')
- elseif exists("s:type") && (s:type ~= 'includegraphics' || s:type == 'psfig')

Discussion


  • Anonymous
    2011-06-19

    I am not allowed to attach a file in your bug report. So I add the full tiny diff for the two issues here (diff against master):

    diff --git a/vimfiles/ftplugin/latex-suite/texviewer.vim b/vimfiles/ftplugin/latex-suite/texviewer.vim
    index 4a1049d..8a7cce5 100644
    --- a/vimfiles/ftplugin/latex-suite/texviewer.vim
    +++ b/vimfiles/ftplugin/latex-suite/texviewer.vim
    @@ -141,13 +141,13 @@ function! Tex_Complete(what, where)
    endif
    endif

    - elseif exists("s:type") && (s:type =~ 'includegraphics' || s:type == 'psfig')
    + elseif exists("s:type") && (s:type == 'includegraphics' || s:type == 'psfig')
    call Tex_SetupFileCompletion(
    \ '',
    \ '^\.\\|\.tex$\\|\.bib$\\|\.bbl$\\|\.zip$\\|\.gz$',
    \ 'noext',
    \ Tex_GetVarValue('Tex_ImageDir', '.'),
    - \ Tex_GetVarValue('Tex_ImageDir', ''))
    + \ '')

    elseif exists("s:type") && s:type == 'bibliography'
    call Tex_SetupFileCompletion(