summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvimboss <devnull@localhost>2009-04-22 12:44:48 +0000
committervimboss <devnull@localhost>2009-04-22 12:44:48 +0000
commitb60a0b69d864eebb43dfd7efdf3c0a8794abcebd (patch)
treee7f382744f671ce851d7d09a5e233bfb46e1fe96
parent83cfbf56ac3b13d69cdba31ba1c1316f4960f97c (diff)
downloadvim-b60a0b69d864eebb43dfd7efdf3c0a8794abcebd.tar.gz
updated for version 7.2-152v7.2.152v7-2-152
-rw-r--r--src/ex_docmd.c5
-rw-r--r--src/message.c16
-rw-r--r--src/proto/message.pro1
-rw-r--r--src/version.c2
4 files changed, 19 insertions, 5 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 38acbfeb..057e7d6c 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -2699,6 +2699,11 @@ doend:
/* 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
diff --git a/src/message.c b/src/message.c
index ffa45a19..6e00c1a7 100644
--- a/src/message.c
+++ b/src/message.c
@@ -3023,11 +3023,7 @@ redir_write(str, maxlen)
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')
@@ -3074,6 +3070,16 @@ redir_write(str, maxlen)
}
}
+ 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()!
diff --git a/src/proto/message.pro b/src/proto/message.pro
index cff7d6b5..09b9152b 100644
--- a/src/proto/message.pro
+++ b/src/proto/message.pro
@@ -54,6 +54,7 @@ void msg_clr_eos_force __ARGS((void));
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));
diff --git a/src/version.c b/src/version.c
index afb3650e..45825767 100644
--- a/src/version.c
+++ b/src/version.c
@@ -677,6 +677,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 152,
+/**/
151,
/**/
150,