1
0
forked from aniani/vim

patch 9.0.0509: confusing error for "saveas" command with "nofile" buffer

Problem:    Confusing error for "saveas" command with "nofile" buffer.
Solution:   Give a clearer error message. (closes #11171)
This commit is contained in:
Bram Moolenaar
2022-09-20 11:49:10 +01:00
parent cd9fa256b5
commit 500a1f9972
4 changed files with 12 additions and 3 deletions

View File

@@ -238,6 +238,12 @@ func Test_saveas()
syntax off
%bw!
call delete('Xsaveas.pl')
" :saveas fails for "nofile" buffer
set buftype=nofile
call assert_fails('saveas Xsafile', 'E676: No matching autocommands for buftype=nofile buffer')
bwipe!
endfunc
func Test_write_errors()