mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
patch 7.4.2008
Problem: evalcmd() has a confusing name. Solution: Rename to execute(). Make silent optional. Support a list of commands.
This commit is contained in:
@@ -566,22 +566,25 @@ emsg(char_u *s)
|
||||
*/
|
||||
if (emsg_silent != 0)
|
||||
{
|
||||
msg_start();
|
||||
p = get_emsg_source();
|
||||
if (p != NULL)
|
||||
if (emsg_noredir == 0)
|
||||
{
|
||||
STRCAT(p, "\n");
|
||||
redir_write(p, -1);
|
||||
vim_free(p);
|
||||
msg_start();
|
||||
p = get_emsg_source();
|
||||
if (p != NULL)
|
||||
{
|
||||
STRCAT(p, "\n");
|
||||
redir_write(p, -1);
|
||||
vim_free(p);
|
||||
}
|
||||
p = get_emsg_lnum();
|
||||
if (p != NULL)
|
||||
{
|
||||
STRCAT(p, "\n");
|
||||
redir_write(p, -1);
|
||||
vim_free(p);
|
||||
}
|
||||
redir_write(s, -1);
|
||||
}
|
||||
p = get_emsg_lnum();
|
||||
if (p != NULL)
|
||||
{
|
||||
STRCAT(p, "\n");
|
||||
redir_write(p, -1);
|
||||
vim_free(p);
|
||||
}
|
||||
redir_write(s, -1);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -3063,8 +3066,8 @@ redir_write(char_u *str, int maxlen)
|
||||
while (cur_col < msg_col)
|
||||
{
|
||||
#ifdef FEAT_EVAL
|
||||
if (redir_evalcmd)
|
||||
evalcmd_redir_str((char_u *)" ", -1);
|
||||
if (redir_execute)
|
||||
execute_redir_str((char_u *)" ", -1);
|
||||
else if (redir_reg)
|
||||
write_reg_contents(redir_reg, (char_u *)" ", -1, TRUE);
|
||||
else if (redir_vname)
|
||||
@@ -3080,8 +3083,8 @@ redir_write(char_u *str, int maxlen)
|
||||
}
|
||||
|
||||
#ifdef FEAT_EVAL
|
||||
if (redir_evalcmd)
|
||||
evalcmd_redir_str(s, maxlen);
|
||||
if (redir_execute)
|
||||
execute_redir_str(s, maxlen);
|
||||
else if (redir_reg)
|
||||
write_reg_contents(redir_reg, s, maxlen, TRUE);
|
||||
else if (redir_vname)
|
||||
@@ -3092,7 +3095,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 && !redir_evalcmd)
|
||||
if (!redir_reg && !redir_vname && !redir_execute)
|
||||
#endif
|
||||
if (redir_fd != NULL)
|
||||
putc(*s, redir_fd);
|
||||
@@ -3117,7 +3120,7 @@ redirecting(void)
|
||||
{
|
||||
return redir_fd != NULL || *p_vfile != NUL
|
||||
#ifdef FEAT_EVAL
|
||||
|| redir_reg || redir_vname || redir_evalcmd
|
||||
|| redir_reg || redir_vname || redir_execute
|
||||
#endif
|
||||
;
|
||||
}
|
||||
|
Reference in New Issue
Block a user