/* Restore msg_scroll, it's set by file I/O commands, even when no
* message is actually displayed. */
msg_scroll = save_msg_scroll;
+
+ /* "silent reg" or "silent echo x" inside "redir" leaves msg_col
+ * somewhere in the line. Put it back in the first column. */
+ if (redirecting())
+ msg_col = 0;
}
#ifdef HAVE_SANDBOX
if (*p_vfile != NUL)
verbose_write(s, maxlen);
- if (redir_fd != NULL
-#ifdef FEAT_EVAL
- || redir_reg || redir_vname
-#endif
- )
+ if (redirecting())
{
/* If the string doesn't start with CR or NL, go to msg_col */
if (*s != '\n' && *s != '\r')
}
}
+ int
+redirecting()
+{
+ return redir_fd != NULL
+#ifdef FEAT_EVAL
+ || redir_reg || redir_vname
+#endif
+ ;
+}
+
/*
* Before giving verbose message.
* Must always be called paired with verbose_leave()!
void msg_clr_cmdline __ARGS((void));
int msg_end __ARGS((void));
void msg_check __ARGS((void));
+int redirecting __ARGS((void));
void verbose_enter __ARGS((void));
void verbose_leave __ARGS((void));
void verbose_enter_scroll __ARGS((void));
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 152,
/**/
151,
/**/