]>
Commit | Line | Data |
---|---|---|
d02ad552 AG |
1 | To: vim-dev@vim.org |
2 | Subject: Patch 6.2.197 | |
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 6.2.197 | |
11 | Problem: It is not possible to force a redraw of status lines. (Gary | |
12 | Johnson) | |
13 | Solution: Add the ":redrawstatus" command. | |
14 | Files: runtime/doc/various.txt, src/ex_cmds.h, src/ex_docmd.c, | |
15 | src/screen.c | |
16 | ||
17 | ||
18 | *** ../vim-6.2.196/runtime/doc/various.txt Sun Jun 1 12:20:37 2003 | |
19 | --- runtime/doc/various.txt Wed Jan 21 13:57:43 2004 | |
20 | *************** | |
21 | *** 1,4 **** | |
22 | ! *various.txt* For Vim version 6.2. Last change: 2003 May 11 | |
23 | ||
24 | ||
25 | VIM REFERENCE MANUAL by Bram Moolenaar | |
26 | --- 1,4 ---- | |
27 | ! *various.txt* For Vim version 6.2. Last change: 2004 Jan 21 | |
28 | ||
29 | ||
30 | VIM REFERENCE MANUAL by Bram Moolenaar | |
31 | *************** | |
32 | *** 24,35 **** | |
33 | or function. Also when halfway a mapping and | |
34 | 'lazyredraw' is set. | |
35 | ||
36 | *N<Del>* | |
37 | <Del> When entering a number: Remove the last digit. | |
38 | Note: if you like to use <BS> for this, add this | |
39 | ! mapping to your .vimrc: | |
40 | :map CTRL-V <BS> CTRL-V <Del> | |
41 | ! See |:fixdel| if your <Del> key does not do what you | |
42 | want. | |
43 | ||
44 | :as[cii] or *ga* *:as* *:ascii* | |
45 | --- 24,42 ---- | |
46 | or function. Also when halfway a mapping and | |
47 | 'lazyredraw' is set. | |
48 | ||
49 | + *:redraws* *:redrawstatus* | |
50 | + :redraws[tatus][!] Redraw the status line of the current window. When ! | |
51 | + is included all status lines are redrawn. | |
52 | + Useful to update the status line(s) when 'statusline' | |
53 | + includes an item that doesn't cause automatic | |
54 | + updating. | |
55 | + | |
56 | *N<Del>* | |
57 | <Del> When entering a number: Remove the last digit. | |
58 | Note: if you like to use <BS> for this, add this | |
59 | ! mapping to your .vimrc: > | |
60 | :map CTRL-V <BS> CTRL-V <Del> | |
61 | ! < See |:fixdel| if your <Del> key does not do what you | |
62 | want. | |
63 | ||
64 | :as[cii] or *ga* *:as* *:ascii* | |
65 | *** ../vim-6.2.196/src/ex_cmds.h Sun Jan 18 20:46:13 2004 | |
66 | --- src/ex_cmds.h Mon Jan 19 12:13:22 2004 | |
67 | *************** | |
68 | *** 618,623 **** | |
69 | --- 618,625 ---- | |
70 | BANG|FILES|TRLBAR|CMDWIN), | |
71 | EX(CMD_redraw, "redraw", ex_redraw, | |
72 | BANG|TRLBAR|CMDWIN), | |
73 | + EX(CMD_redrawstatus, "redrawstatus", ex_redrawstatus, | |
74 | + BANG|TRLBAR|CMDWIN), | |
75 | EX(CMD_registers, "registers", ex_display, | |
76 | EXTRA|NOTRLCOM|TRLBAR|CMDWIN), | |
77 | EX(CMD_resize, "resize", ex_resize, | |
78 | *** ../vim-6.2.196/src/ex_docmd.c Sun Jan 18 21:12:26 2004 | |
79 | --- src/ex_docmd.c Thu Jan 22 17:22:52 2004 | |
80 | *************** | |
81 | *** 269,274 **** | |
82 | --- 269,275 ---- | |
83 | static void ex_redo __ARGS((exarg_T *eap)); | |
84 | static void ex_redir __ARGS((exarg_T *eap)); | |
85 | static void ex_redraw __ARGS((exarg_T *eap)); | |
86 | + static void ex_redrawstatus __ARGS((exarg_T *eap)); | |
87 | static void close_redir __ARGS((void)); | |
88 | static void ex_mkrc __ARGS((exarg_T *eap)); | |
89 | static void ex_mark __ARGS((exarg_T *eap)); | |
90 | *************** | |
91 | *** 7178,7183 **** | |
92 | --- 7179,7213 ---- | |
93 | RedrawingDisabled = r; | |
94 | p_lz = p; | |
95 | out_flush(); | |
96 | + } | |
97 | + | |
98 | + /* | |
99 | + * ":redrawstatus": force redraw of status line(s) | |
100 | + */ | |
101 | + /*ARGSUSED*/ | |
102 | + static void | |
103 | + ex_redrawstatus(eap) | |
104 | + exarg_T *eap; | |
105 | + { | |
106 | + #if defined(FEAT_WINDOWS) | |
107 | + int r = RedrawingDisabled; | |
108 | + int p = p_lz; | |
109 | + | |
110 | + RedrawingDisabled = 0; | |
111 | + p_lz = FALSE; | |
112 | + if (eap->forceit) | |
113 | + status_redraw_all(); | |
114 | + else | |
115 | + status_redraw_curbuf(); | |
116 | + update_screen( | |
117 | + # ifdef FEAT_VISUAL | |
118 | + VIsual_active ? INVERTED : | |
119 | + # endif | |
120 | + 0); | |
121 | + RedrawingDisabled = r; | |
122 | + p_lz = p; | |
123 | + out_flush(); | |
124 | + #endif | |
125 | } | |
126 | ||
127 | static void | |
128 | *** ../vim-6.2.196/src/screen.c Mon Aug 4 20:55:46 2003 | |
129 | --- src/screen.c Thu Jan 22 17:22:13 2004 | |
130 | *************** | |
131 | *** 4584,4590 **** | |
132 | } | |
133 | } | |
134 | ||
135 | - # if defined(FEAT_KEYMAP) || defined(PROTO) | |
136 | /* | |
137 | * mark all status lines of the current buffer for redraw | |
138 | */ | |
139 | --- 4584,4589 ---- | |
140 | *************** | |
141 | *** 4600,4606 **** | |
142 | redraw_later(VALID); | |
143 | } | |
144 | } | |
145 | - # endif | |
146 | ||
147 | /* | |
148 | * Redraw all status lines that need to be redrawn. | |
149 | --- 4599,4604 ---- | |
150 | *** ../vim-6.2.196/src/version.c Sun Jan 25 19:28:46 2004 | |
151 | --- src/version.c Sun Jan 25 19:30:35 2004 | |
152 | *************** | |
153 | *** 639,640 **** | |
154 | --- 639,642 ---- | |
155 | { /* Add new patch number below this line */ | |
156 | + /**/ | |
157 | + 197, | |
158 | /**/ | |
159 | ||
160 | -- | |
161 | No children may attend school with their breath smelling of "wild onions." | |
162 | [real standing law in West Virginia, United States of America] | |
163 | ||
164 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
165 | /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
166 | \\\ Project leader for A-A-P -- http://www.A-A-P.org /// | |
167 | \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html /// |