diff options
author | ZyX <kp-pav@yandex.ru> | 2016-07-31 20:13:19 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-02-14 01:10:31 +0300 |
commit | fe0eecf9cc9a9290cc67168779edc101e59d77eb (patch) | |
tree | 0e136b4c7b332d6c99f6dde50ca1c2ab1d4d95a3 /src/nvim/ex_cmds.c | |
parent | 222d98310a3b196cf21ca5885765b2ddca9195b6 (diff) | |
download | rneovim-fe0eecf9cc9a9290cc67168779edc101e59d77eb.tar.gz rneovim-fe0eecf9cc9a9290cc67168779edc101e59d77eb.tar.bz2 rneovim-fe0eecf9cc9a9290cc67168779edc101e59d77eb.zip |
eval: writefile: Give more adequate IO errors and do not call putc()
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r-- | src/nvim/ex_cmds.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index 4b3798794c..2297d14cb6 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -1131,11 +1131,12 @@ static void do_filter( */ ++no_wait_return; /* don't call wait_return() while busy */ if (itmp != NULL && buf_write(curbuf, itmp, NULL, line1, line2, eap, - FALSE, FALSE, FALSE, TRUE) == FAIL) { - msg_putchar('\n'); /* keep message from buf_write() */ - --no_wait_return; - if (!aborting()) - (void)EMSG2(_(e_notcreate), itmp); /* will call wait_return */ + false, false, false, true) == FAIL) { + msg_putchar('\n'); // Keep message from buf_write(). + no_wait_return--; + if (!aborting()) { + EMSG2(_("E482: Can't create file %s"), itmp); // Will call wait_return. + } goto filterend; } if (curbuf != old_curbuf) |