1. Takeshi NISHIDA
  2. vim-l9
  3. Issues
Issue #6 new

cannot open file when path to file contains parentheses

Anonymous created an issue

Cannot open file when path to file contains left parentheses.

OS: Windows 7. Vim version: 7.3 (Gvim). Fuzzy finder version: 4.2.2 L9 library version: 1.1

Steps to reproduce a bug: 1. Create a directory structure with parentheses in names. For example: SOURCE(10)Libs\MyLib.cpp

  1. Make directory SOURCE curernt Vim directory with :cd command (:cd SOURCE)

  2. Start FuzzyFinder in CoverageFile mode and type MyLib

  3. Try to open MyLib.cpp in the new tab by Ctrl-L. Empty tab opens (should be opened with file MyLib.cpp)

Comments (1)

  1. Anonymous

    I've fixed this by defining function ReplaceBackslashesWithSlashes and calling it in fuf.vim, but there must be better way.

    function! ReplaceBackslashesWithSlashes(inp) return substitute(a:inp, "
    ", "\/", "g") endfunction

    function fuf#openFile(path, mode, reuse) let bufNr = bufnr('^' . a:path . '$') if bufNr > -1 call fuf#openBuffer(bufNr, a:mode, a:reuse) else execute { \ s:OPEN_TYPE_CURRENT : 'edit ' , \ s:OPEN_TYPE_SPLIT : 'split ' , \ s:OPEN_TYPE_VSPLIT : 'vsplit ' , \ s:OPEN_TYPE_TAB : 'tabedit ', \ }[a:mode] . ReplaceBackslashesWithSlashes(fnameescape(fnamemodify(a:path, '::.'))) endif endfunction

  2. Log in to comment