diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-07-07 23:04:18 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-07-07 23:04:18 +0200 |
commit | bc5d6dd1dd1dc3a06e4e655fc9479529db288365 (patch) | |
tree | a1a4a52ccd792948a0da290701ed3fbc14b34ed5 /src/message.c | |
parent | bf2cc5f36d5ffd5de445e6970602000c7869b65a (diff) | |
download | vim-git-bc5d6dd1dd1dc3a06e4e655fc9479529db288365.tar.gz |
patch 7.4.1999v7.4.1999
Problem: evalcmd() doesn't work recursively.
Solution: Use redir_evalcmd instead of redir_vname.
Diffstat (limited to 'src/message.c')
-rw-r--r-- | src/message.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/message.c b/src/message.c index b86c88675..f793ed414 100644 --- a/src/message.c +++ b/src/message.c @@ -3063,7 +3063,9 @@ redir_write(char_u *str, int maxlen) while (cur_col < msg_col) { #ifdef FEAT_EVAL - if (redir_reg) + if (redir_evalcmd) + evalcmd_redir_str((char_u *)" ", -1); + else if (redir_reg) write_reg_contents(redir_reg, (char_u *)" ", -1, TRUE); else if (redir_vname) var_redir_str((char_u *)" ", -1); @@ -3078,9 +3080,11 @@ redir_write(char_u *str, int maxlen) } #ifdef FEAT_EVAL - if (redir_reg) + if (redir_evalcmd) + evalcmd_redir_str(s, maxlen); + else if (redir_reg) write_reg_contents(redir_reg, s, maxlen, TRUE); - if (redir_vname) + else if (redir_vname) var_redir_str(s, maxlen); #endif @@ -3088,7 +3092,7 @@ redir_write(char_u *str, int maxlen) while (*s != NUL && (maxlen < 0 || (int)(s - str) < maxlen)) { #ifdef FEAT_EVAL - if (!redir_reg && !redir_vname) + if (!redir_reg && !redir_vname && !redir_evalcmd) #endif if (redir_fd != NULL) putc(*s, redir_fd); @@ -3113,7 +3117,7 @@ redirecting(void) { return redir_fd != NULL || *p_vfile != NUL #ifdef FEAT_EVAL - || redir_reg || redir_vname + || redir_reg || redir_vname || redir_evalcmd #endif ; } |