Skip to content

Commit a85ce87

Browse files
committed
edit files using a relative path when possible
1 parent 118afa2 commit a85ce87

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugin/ranger.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ if has('nvim')
5555
try
5656
if filereadable(s:choice_file_path)
5757
for f in readfile(s:choice_file_path)
58-
exec self.edit_cmd . f
58+
exec self.edit_cmd . split(f, getcwd() . '/')[0]
5959
endfor
6060
call delete(s:choice_file_path)
6161
endif
@@ -79,7 +79,7 @@ else
7979
endif
8080
if filereadable(s:choice_file_path)
8181
for f in readfile(s:choice_file_path)
82-
exec a:edit_cmd . f
82+
exec a:edit_cmd . split(f, getcwd() . '/')[0]
8383
endfor
8484
call delete(s:choice_file_path)
8585
endif

0 commit comments

Comments
 (0)