aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/message.c
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2017-01-10 09:56:53 -0500
committerGitHub <noreply@github.com>2017-01-10 09:56:53 -0500
commit77de73c7c80216c3d605ab70fbf19ab998cc8f3e (patch)
treedb9e91a3fb6736018b49a2798f5187efa6673a2c /src/nvim/message.c
parent9fcf6d577fa712d2ce420012c53a687cc9f7301d (diff)
parentf3c93fbefe8c444a2c3cf583b168f24a352ad1f5 (diff)
downloadrneovim-77de73c7c80216c3d605ab70fbf19ab998cc8f3e.tar.gz
rneovim-77de73c7c80216c3d605ab70fbf19ab998cc8f3e.tar.bz2
rneovim-77de73c7c80216c3d605ab70fbf19ab998cc8f3e.zip
Merge pull request #5919 from jamessan/vim-7.4.2008
vim-patch:7.4.2008,7.4.2009
Diffstat (limited to 'src/nvim/message.c')
-rw-r--r--src/nvim/message.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c
index 637b89ccbe..2f8feda6ec 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,8 +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;
}
/*