mirror of
https://github.com/neovim/neovim.git
synced 2025-10-06 18:06:30 +00:00
vim-patch:8.1.2180: Error E303 is not useful when 'directory' is empty (#11257)
Problem: Error E303 is not useful when 'directory' is empty.
Solution: Skip the error message. (Daniel Hahler, vim/vim#5067)
00e192becd
This commit is contained in:

committed by
Justin M. Keyes

parent
68b0873c45
commit
3de4dc539a
@@ -523,9 +523,9 @@ void ml_open_file(buf_T *buf)
|
||||
}
|
||||
}
|
||||
|
||||
if (mfp->mf_fname == NULL) { /* Failed! */
|
||||
need_wait_return = TRUE; /* call wait_return later */
|
||||
++no_wait_return;
|
||||
if (*p_dir != NUL && mfp->mf_fname == NULL) {
|
||||
need_wait_return = true; // call wait_return later
|
||||
no_wait_return++;
|
||||
(void)EMSG2(_(
|
||||
"E303: Unable to open swap file for \"%s\", recovery impossible"),
|
||||
buf_spname(buf) != NULL ? buf_spname(buf) : buf->b_fname);
|
||||
|
@@ -14,6 +14,12 @@ func Test_recover_root_dir()
|
||||
set dir=/notexist/
|
||||
endif
|
||||
call assert_fails('split Xtest', 'E303:')
|
||||
|
||||
" No error with empty 'directory' setting.
|
||||
set directory=
|
||||
split XtestOK
|
||||
close!
|
||||
|
||||
set dir&
|
||||
endfunc
|
||||
|
||||
|
Reference in New Issue
Block a user