m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-16 23:33:39 -05:00

[vim] Fix escape of backslash in s:shortpath

Close #1000
This commit is contained in:
Jan Edmund Lazo
2017-07-29 20:38:58 -04:00
committed by Junegunn Choi
parent 8db3345c2f
commit 1fcc07e54e

View File

@@ -756,7 +756,7 @@ let s:default_action = {
function! s:shortpath()
let short = pathshorten(fnamemodify(getcwd(), ':~:.'))
let slash = (s:is_win && !&shellslash) ? '\' : '/'
return empty(short) ? '~'.slash : short . (short =~ slash.'$' ? '' : slash)
return empty(short) ? '~'.slash : short . (short =~ escape(slash, '\').'$' ? '' : slash)
endfunction
function! s:cmd(bang, ...) abort