]>
Commit | Line | Data |
---|---|---|
4c0a682a AG |
1 | To: vim-dev@vim.org |
2 | Subject: Patch 7.2.152 | |
3 | Fcc: outbox | |
4 | From: Bram Moolenaar <Bram@moolenaar.net> | |
5 | Mime-Version: 1.0 | |
6 | Content-Type: text/plain; charset=ISO-8859-1 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ------------ | |
9 | ||
10 | Patch 7.2.152 | |
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 | |
15 | ||
16 | ||
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 | |
19 | *************** | |
20 | *** 2699,2704 **** | |
21 | --- 2699,2709 ---- | |
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; | |
25 | + | |
26 | + /* "silent reg" or "silent echo x" inside "redir" leaves msg_col | |
27 | + * somewhere in the line. Put it back in the first column. */ | |
28 | + if (redirecting()) | |
29 | + msg_col = 0; | |
30 | } | |
31 | ||
32 | #ifdef HAVE_SANDBOX | |
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 | |
35 | *************** | |
36 | *** 3023,3033 **** | |
37 | if (*p_vfile != NUL) | |
38 | verbose_write(s, maxlen); | |
39 | ||
40 | ! if (redir_fd != NULL | |
41 | ! #ifdef FEAT_EVAL | |
42 | ! || redir_reg || redir_vname | |
43 | ! #endif | |
44 | ! ) | |
45 | { | |
46 | /* If the string doesn't start with CR or NL, go to msg_col */ | |
47 | if (*s != '\n' && *s != '\r') | |
48 | --- 3023,3029 ---- | |
49 | if (*p_vfile != NUL) | |
50 | verbose_write(s, maxlen); | |
51 | ||
52 | ! if (redirecting()) | |
53 | { | |
54 | /* If the string doesn't start with CR or NL, go to msg_col */ | |
55 | if (*s != '\n' && *s != '\r') | |
56 | *************** | |
57 | *** 3074,3079 **** | |
58 | --- 3070,3085 ---- | |
59 | } | |
60 | } | |
61 | ||
62 | + int | |
63 | + redirecting() | |
64 | + { | |
65 | + return redir_fd != NULL | |
66 | + #ifdef FEAT_EVAL | |
67 | + || redir_reg || redir_vname | |
68 | + #endif | |
69 | + ; | |
70 | + } | |
71 | + | |
72 | /* | |
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 | |
77 | *************** | |
78 | *** 54,59 **** | |
79 | --- 54,60 ---- | |
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 | |
89 | *************** | |
90 | *** 678,679 **** | |
91 | --- 678,681 ---- | |
92 | { /* Add new patch number below this line */ | |
93 | + /**/ | |
94 | + 152, | |
95 | /**/ | |
96 | ||
97 | -- | |
98 | Q: How does a UNIX Guru pick up a girl? | |
99 | A: look; grep; which; eval; nice; uname; talk; date; | |
100 | ||
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 /// |