4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: When using "silent echo x" inside ":redir" a next echo may start
12 halfway the line. (Tony Mechelynck, Dennis Benzinger)
13 Solution: Reset msg_col after redirecting silently.
14 Files: src/ex_docmd.c, src/message.c, src/proto/message.pro
17 *** ../vim-7.2.151/src/ex_docmd.c Wed Mar 18 12:50:58 2009
18 --- src/ex_docmd.c Wed Apr 22 11:57:49 2009
22 /* Restore msg_scroll, it's set by file I/O commands, even when no
23 * message is actually displayed. */
24 msg_scroll = save_msg_scroll;
26 + /* "silent reg" or "silent echo x" inside "redir" leaves msg_col
27 + * somewhere in the line. Put it back in the first column. */
33 *** ../vim-7.2.151/src/message.c Tue Feb 24 04:36:50 2009
34 --- src/message.c Sun Apr 12 14:08:25 2009
38 verbose_write(s, maxlen);
40 ! if (redir_fd != NULL
42 ! || redir_reg || redir_vname
46 /* If the string doesn't start with CR or NL, go to msg_col */
47 if (*s != '\n' && *s != '\r')
50 verbose_write(s, maxlen);
54 /* If the string doesn't start with CR or NL, go to msg_col */
55 if (*s != '\n' && *s != '\r')
65 + return redir_fd != NULL
67 + || redir_reg || redir_vname
73 * Before giving verbose message.
74 * Must always be called paired with verbose_leave()!
75 *** ../vim-7.2.151/src/proto/message.pro Sat May 5 19:35:34 2007
76 --- src/proto/message.pro Sun Apr 12 14:08:50 2009
80 void msg_clr_cmdline __ARGS((void));
81 int msg_end __ARGS((void));
82 void msg_check __ARGS((void));
83 + int redirecting __ARGS((void));
84 void verbose_enter __ARGS((void));
85 void verbose_leave __ARGS((void));
86 void verbose_enter_scroll __ARGS((void));
87 *** ../vim-7.2.151/src/version.c Wed Apr 22 13:50:14 2009
88 --- src/version.c Wed Apr 22 14:40:22 2009
92 { /* Add new patch number below this line */
98 Q: How does a UNIX Guru pick up a girl?
99 A: look; grep; which; eval; nice; uname; talk; date;
101 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
102 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
103 \\\ download, build and distribute -- http://www.A-A-P.org ///
104 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///