Permalink
Browse files

Merge pull request #29 from futuro/man_plugin_compat

Fixed incompatibility with tilde characters in filenames
  • Loading branch information...
2 parents 74e8194 + 1bef194 commit 2fc4085ad3071ebf957680310bc1f08cf45da0e0 @fholgado fholgado committed Feb 27, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 plugin/minibufexpl.vim
@@ -689,6 +689,11 @@ augroup NONE
" }}}
" Functions
+" EscapeTilde - escapes "~" {{{
+function! <SID>EscapeTilde(str)
+ return substitute(a:str, "\\\~","\\\\\~","g")
+endfunction
+" }}}
"
" StartExplorer - Sets up our explorer and causes it to be displayed {{{
"
@@ -819,7 +824,8 @@ function! <SID>StartExplorer(sticky,delBufNum,currBufName)
call <SID>DisplayBuffers(a:delBufNum,a:currBufName)
if (l:curBuf != -1)
- call search('\['.l:curBuf.':'.expand('#'.l:curBuf.':t').'\]')
+ let l:bname = <SID>EscapeTilde(expand('#'.l:curBuf.':t'))
+ call search('\['.l:curBuf.':'.l:bname.'\]')
else
call <SID>DEBUG('No current buffer to search for',9)
endif

0 comments on commit 2fc4085

Please sign in to comment.