diff options
author | James McCoy <jamessan@jamessan.com> | 2017-01-08 23:13:51 -0500 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2017-01-10 07:14:12 -0500 |
commit | 6520517e22ad87e1be558f2e899152ca5a9174a2 (patch) | |
tree | 16b726be3b3caac3976c7857fbed5e5fee0814a9 /src/nvim/message.c | |
parent | 9fcf6d577fa712d2ce420012c53a687cc9f7301d (diff) | |
download | rneovim-6520517e22ad87e1be558f2e899152ca5a9174a2.tar.gz rneovim-6520517e22ad87e1be558f2e899152ca5a9174a2.tar.bz2 rneovim-6520517e22ad87e1be558f2e899152ca5a9174a2.zip |
vim-patch:7.4.2008
Problem: evalcmd() has a confusing name.
Solution: Rename to execute(). Make silent optional. Support a list of
commands.
https://github.com/vim/vim/commit/79815f1ec77406f2f21a618c053e5793b597db7a
Diffstat (limited to 'src/nvim/message.c')
-rw-r--r-- | src/nvim/message.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c index 637b89ccbe..8c164111f2 100644 --- a/src/nvim/message.c +++ b/src/nvim/message.c @@ -508,20 +508,22 @@ int emsg(char_u *s) * But do write it to the redirection file. */ if (emsg_silent != 0) { - msg_start(); - p = get_emsg_source(); - if (p != NULL) { - STRCAT(p, "\n"); - redir_write(p, STRLEN(p)); - xfree(p); - } - p = get_emsg_lnum(); - if (p != NULL) { - STRCAT(p, "\n"); - redir_write(p, STRLEN(p)); - xfree(p); + if (!emsg_noredir) { + msg_start(); + p = get_emsg_source(); + if (p != NULL) { + STRCAT(p, "\n"); + redir_write(p, STRLEN(p)); + xfree(p); + } + p = get_emsg_lnum(); + if (p != NULL) { + STRCAT(p, "\n"); + redir_write(p, STRLEN(p)); + xfree(p); + } + redir_write(s, STRLEN(s)); } - redir_write(s, STRLEN(s)); return true; } @@ -2508,7 +2510,7 @@ static void redir_write(char_u *str, int maxlen) int redirecting(void) { return redir_fd != NULL || *p_vfile != NUL - || redir_reg || redir_vname + || redir_reg || redir_vname || capture_ga != NULL ; } |