summaryrefslogtreecommitdiff
path: root/plugin/fzf.vim
diff options
context:
space:
mode:
authorKonstantin-Glukhov <24302271+Konstantin-Glukhov@users.noreply.github.com>2024-05-28 23:15:14 +0900
committerGitHub <noreply@github.com>2024-05-28 23:15:14 +0900
commit124cd70710cb7c94ef2282773494bb0d727598d8 (patch)
treec4f9e1107399590ff727f0b3ec57df48cc0f6413 /plugin/fzf.vim
parent99bd6de5415dccec4b1b21121224116bbfbc462f (diff)
downloadfzf-124cd70710cb7c94ef2282773494bb0d727598d8.tar.gz
[vim] Do not prepend CWD to path starting with a backslash on Windows (#3820)
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
Diffstat (limited to 'plugin/fzf.vim')
-rw-r--r--plugin/fzf.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim
index fc7b196a..3a8765ba 100644
--- a/plugin/fzf.vim
+++ b/plugin/fzf.vim
@@ -327,7 +327,7 @@ function! s:common_sink(action, lines) abort
" the execution (e.g. `set autochdir` or `autocmd BufEnter * lcd ...`)
let cwd = exists('w:fzf_pushd') ? w:fzf_pushd.dir : expand('%:p:h')
for item in a:lines
- if item[0] != '~' && item !~ (s:is_win ? '^[A-Z]:\' : '^/')
+ if item[0] != '~' && item !~ (s:is_win ? '^\([A-Z]:\)\?\' : '^/')
let sep = s:is_win ? '\' : '/'
let item = join([cwd, item], cwd[len(cwd)-1] == sep ? '' : sep)
endif