summaryrefslogtreecommitdiffstats
path: root/plugin
diff options
context:
space:
mode:
authorJan Edmund Lazo <janedmundlazo@hotmail.com>2017-07-29 20:38:58 -0400
committerJunegunn Choi <junegunn.c@gmail.com>2017-07-30 20:05:01 +0900
commit1fcc07e54ed2098be9f8b8b21e4b4292f2c5ea0c (patch)
tree826e8bbcd0fe7e9bd35b81f60d4da376059d3b1d /plugin
parent8db3345c2fe5551a7cbc838ddef009813cdeec41 (diff)
[vim] Fix escape of backslash in s:shortpath
Close #1000
Diffstat (limited to 'plugin')
-rw-r--r--plugin/fzf.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim
index a70a3b33..7e19f25c 100644
--- a/plugin/fzf.vim
+++ b/plugin/fzf.vim
@@ -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