mirror of
https://github.com/junegunn/fzf.git
synced 2024-09-11 14:35:26 +03:00
[vim] Replace backslashes with forward slashes on win32unix
This commit is contained in:
parent
b5b0d6b3ea
commit
561f9291fd
@ -327,6 +327,9 @@ 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 has('win32unix') && item !~ '/'
|
||||
let item = substitute(item, '\', '/', 'g')
|
||||
end
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user