Skip to content
Snippets Groups Projects
Commit 0b4542fc authored by Junegunn Choi's avatar Junegunn Choi
Browse files

[vim] Temporarily disable &autochdir when opening files (#306)

parent 02bd2d2a
No related branches found
No related tags found
No related merge requests found
......@@ -368,9 +368,15 @@ function! s:cmd_callback(lines) abort
endif
let key = remove(a:lines, 0)
let cmd = get(s:action, key, 'e')
for item in a:lines
execute cmd s:escape(item)
endfor
try
let autochdir = &autochdir
set noautochdir
for item in a:lines
execute cmd s:escape(item)
endfor
finally
let &autochdir = autochdir
endtry
endfunction
function! s:cmd(bang, ...) abort
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment