Do not proceed if getcwd() returns an empty string

Close #439
This commit is contained in:
Junegunn Choi 2016-03-06 11:03:33 +09:00
parent c3d57ac6b5
commit 7218143147

View File

@ -665,6 +665,10 @@ function! s:finish_bindings()
endfunction endfunction
function! s:prepare(...) function! s:prepare(...)
if empty(getcwd())
throw 'Invalid current working directory. Cannot proceed.'
endif
call s:job_abort() call s:job_abort()
if s:switch_in() if s:switch_in()
normal q normal q