diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2017-02-27 10:20:25 +0100 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-02-27 10:20:25 +0100 | 
| commit | 8c8ce1832e780f87b2922ba3acf0d44f78c50931 (patch) | |
| tree | b4188c6c617bce73f806019d205129cee1f64e55 /src/nvim/ex_cmds.c | |
| parent | e502cca010357773252c686ef535bb2998aeb50b (diff) | |
| parent | 31cdb227ba60e8867b3cb8e60ae8215290dd85a4 (diff) | |
| download | rneovim-8c8ce1832e780f87b2922ba3acf0d44f78c50931.tar.gz rneovim-8c8ce1832e780f87b2922ba3acf0d44f78c50931.tar.bz2 rneovim-8c8ce1832e780f87b2922ba3acf0d44f78c50931.zip  | |
Merge #6111 from ZyX-I/split-eval'/os-fileio
Refactor writefile() and create more tests for it
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 a03878dec2..0fda9a8ae6 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)  | 
