Skip to content

Commit ea1347b

Browse files
committed
Don't force {} to absolute path
Closes tpope#116
1 parent 2f7ccf2 commit ea1347b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Diff for: autoload/projectionist.vim

+8-2
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,13 @@ function! projectionist#shellescape(arg) abort
8282
endfunction
8383

8484
function! projectionist#shellpath(arg) abort
85-
return empty(a:arg) ? '' : projectionist#shellescape(s:real(a:arg))
85+
if empty(a:arg)
86+
return ''
87+
elseif a:arg =~# '^[[:alnum:].+-]\+:'
88+
return projectionist#shellescape(s:real(a:arg))
89+
else
90+
return projectionist#shellescape(a:arg)
91+
endif
8692
endfunction
8793

8894
function! s:join(arg) abort
@@ -428,7 +434,7 @@ function! projectionist#query(key, ...) abort
428434
endfunction
429435

430436
function! s:absolute(path, in) abort
431-
if a:path =~# '^\%([[:alnum:].-]\+:\)\|^\.\?[\/]\|^$'
437+
if a:path =~# '^\%([[:alnum:].+-]\+:\)\|^\.\?[\/]\|^$'
432438
return a:path
433439
else
434440
return substitute(a:in, '[\/]$', '', '') . projectionist#slash() . a:path

0 commit comments

Comments
 (0)