Skip to content
Myr

[vim] Do not prepend CWD to path starting with a backslash on Windows (#3820)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Konstantin-Glukhov · committed by GitHub · parent 99bd6de · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:plugin/fzf.vim+1 added-1 removed
325 unmodified lines
326 " Preserve the current working directory in case it's changed during327 " the execution (e.g. `set autochdir` or `autocmd BufEnter * lcd ...`)328 let cwd = exists('w:fzf_pushd') ? w:fzf_pushd.dir : expand('%:p:h')329 for item in a:lines330 if item[0] != '~' && item !~ (s:is_win ? '^[A-Z]:\' : '^/')330 if item[0] != '~' && item !~ (s:is_win ? '^\([A-Z]:\)\?\' : '^/')331 let sep = s:is_win ? '\' : '/'332 let item = join([cwd, item], cwd[len(cwd)-1] == sep ? '' : sep)333 endif334 if empty
760 unmodified lines