From 1fcc07e54ed2098be9f8b8b21e4b4292f2c5ea0c Mon Sep 17 00:00:00 2001
From: Jan Edmund Lazo <janedmundlazo@hotmail.com>
Date: Sat, 29 Jul 2017 20:38:58 -0400
Subject: [PATCH] [vim] Fix escape of backslash in s:shortpath

Close #1000
---
 plugin/fzf.vim | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
-- 
GitLab