]> git.ipfire.org Git - people/arne_f/ipfire-3.x.git/blame - vim/patches/vim-7.3.426.patch0
vim: Update configuration file.
[people/arne_f/ipfire-3.x.git] / vim / patches / vim-7.3.426.patch0
CommitLineData
c6060300
MT
1To: vim_dev@googlegroups.com
2Subject: Patch 7.3.426
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 7.3.426
11Problem: With '$' in 'cpoptions' the $ is not displayed in the first
12 column.
13Solution: Use -1 instead of 0 as a special value. (Hideki Eiraku and
14 Hirohito Higashi)
15Files: src/edit.c, src/globals.h, src/move.c, src/screen.c, src/search.c
16
17
18*** ../vim-7.3.425/src/edit.c 2012-01-26 18:58:25.000000000 +0100
19--- src/edit.c 2012-02-04 23:23:45.000000000 +0100
20***************
21*** 1763,1771 ****
22 static void
23 undisplay_dollar()
24 {
25! if (dollar_vcol)
26 {
27! dollar_vcol = 0;
28 redrawWinline(curwin->w_cursor.lnum, FALSE);
29 }
30 }
31--- 1763,1771 ----
32 static void
33 undisplay_dollar()
34 {
35! if (dollar_vcol >= 0)
36 {
37! dollar_vcol = -1;
38 redrawWinline(curwin->w_cursor.lnum, FALSE);
39 }
40 }
41***************
42*** 5441,5447 ****
43 compl_curr_match->cp_number);
44 edit_submode_extra = match_ref;
45 edit_submode_highl = HLF_R;
46! if (dollar_vcol)
47 curs_columns(FALSE);
48 }
49 }
50--- 5441,5447 ----
51 compl_curr_match->cp_number);
52 edit_submode_extra = match_ref;
53 edit_submode_highl = HLF_R;
54! if (dollar_vcol >= 0)
55 curs_columns(FALSE);
56 }
57 }
58***************
59*** 8961,8967 ****
60 * We can emulate the vi behaviour by pretending there is a dollar
61 * displayed even when there isn't.
62 * --pkv Sun Jan 19 01:56:40 EST 2003 */
63! if (vim_strchr(p_cpo, CPO_BACKSPACE) != NULL && dollar_vcol == 0)
64 dollar_vcol = curwin->w_virtcol;
65
66 #ifdef FEAT_FOLDING
67--- 8961,8967 ----
68 * We can emulate the vi behaviour by pretending there is a dollar
69 * displayed even when there isn't.
70 * --pkv Sun Jan 19 01:56:40 EST 2003 */
71! if (vim_strchr(p_cpo, CPO_BACKSPACE) != NULL && dollar_vcol == -1)
72 dollar_vcol = curwin->w_virtcol;
73
74 #ifdef FEAT_FOLDING
75*** ../vim-7.3.425/src/globals.h 2011-05-10 16:41:13.000000000 +0200
76--- src/globals.h 2012-02-04 23:24:07.000000000 +0100
77***************
78*** 113,121 ****
79 * When '$' is included in 'cpoptions' option set:
80 * When a change command is given that deletes only part of a line, a dollar
81 * is put at the end of the changed text. dollar_vcol is set to the virtual
82! * column of this '$'.
83 */
84! EXTERN colnr_T dollar_vcol INIT(= 0);
85
86 #ifdef FEAT_INS_EXPAND
87 /*
88--- 113,121 ----
89 * When '$' is included in 'cpoptions' option set:
90 * When a change command is given that deletes only part of a line, a dollar
91 * is put at the end of the changed text. dollar_vcol is set to the virtual
92! * column of this '$'. -1 is used to indicate no $ is being displayed.
93 */
94! EXTERN colnr_T dollar_vcol INIT(= -1);
95
96 #ifdef FEAT_INS_EXPAND
97 /*
98*** ../vim-7.3.425/src/move.c 2012-01-10 22:26:12.000000000 +0100
99--- src/move.c 2012-02-04 23:21:08.000000000 +0100
100***************
101*** 362,368 ****
102 #endif
103 )
104 {
105! dollar_vcol = 0;
106 if (curwin->w_skipcol != 0)
107 {
108 curwin->w_skipcol = 0;
109--- 362,368 ----
110 #endif
111 )
112 {
113! dollar_vcol = -1;
114 if (curwin->w_skipcol != 0)
115 {
116 curwin->w_skipcol = 0;
117***************
118*** 966,972 ****
119
120 /* remove '$' from change command when cursor moves onto it */
121 if (startcol > dollar_vcol)
122! dollar_vcol = 0;
123
124 extra = curwin_col_off();
125 curwin->w_wcol = curwin->w_virtcol + extra;
126--- 966,972 ----
127
128 /* remove '$' from change command when cursor moves onto it */
129 if (startcol > dollar_vcol)
130! dollar_vcol = -1;
131
132 extra = curwin_col_off();
133 curwin->w_wcol = curwin->w_virtcol + extra;
134*** ../vim-7.3.425/src/screen.c 2012-01-10 22:26:12.000000000 +0100
135--- src/screen.c 2012-02-04 23:22:44.000000000 +0100
136***************
137*** 1637,1647 ****
138 * When at start of changed lines: May scroll following lines
139 * up or down to minimize redrawing.
140 * Don't do this when the change continues until the end.
141! * Don't scroll when dollar_vcol is non-zero, keep the "$".
142 */
143 if (lnum == mod_top
144 && mod_bot != MAXLNUM
145! && !(dollar_vcol != 0 && mod_bot == mod_top + 1))
146 {
147 int old_rows = 0;
148 int new_rows = 0;
149--- 1637,1647 ----
150 * When at start of changed lines: May scroll following lines
151 * up or down to minimize redrawing.
152 * Don't do this when the change continues until the end.
153! * Don't scroll when dollar_vcol >= 0, keep the "$".
154 */
155 if (lnum == mod_top
156 && mod_bot != MAXLNUM
157! && !(dollar_vcol >= 0 && mod_bot == mod_top + 1))
158 {
159 int old_rows = 0;
160 int new_rows = 0;
161***************
162*** 1868,1879 ****
163 if (row > wp->w_height) /* past end of screen */
164 {
165 /* we may need the size of that too long line later on */
166! if (dollar_vcol == 0)
167 wp->w_lines[idx].wl_size = plines_win(wp, lnum, TRUE);
168 ++idx;
169 break;
170 }
171! if (dollar_vcol == 0)
172 wp->w_lines[idx].wl_size = row - srow;
173 ++idx;
174 #ifdef FEAT_FOLDING
175--- 1868,1879 ----
176 if (row > wp->w_height) /* past end of screen */
177 {
178 /* we may need the size of that too long line later on */
179! if (dollar_vcol == -1)
180 wp->w_lines[idx].wl_size = plines_win(wp, lnum, TRUE);
181 ++idx;
182 break;
183 }
184! if (dollar_vcol == -1)
185 wp->w_lines[idx].wl_size = row - srow;
186 ++idx;
187 #ifdef FEAT_FOLDING
188***************
189*** 1990,1996 ****
190 }
191 #endif
192 }
193! else if (dollar_vcol == 0)
194 wp->w_botline = lnum;
195
196 /* make sure the rest of the screen is blank */
197--- 1990,1996 ----
198 }
199 #endif
200 }
201! else if (dollar_vcol == -1)
202 wp->w_botline = lnum;
203
204 /* make sure the rest of the screen is blank */
205***************
206*** 2005,2011 ****
207 wp->w_old_botfill = wp->w_botfill;
208 #endif
209
210! if (dollar_vcol == 0)
211 {
212 /*
213 * There is a trick with w_botline. If we invalidate it on each
214--- 2005,2011 ----
215 wp->w_old_botfill = wp->w_botfill;
216 #endif
217
218! if (dollar_vcol == -1)
219 {
220 /*
221 * There is a trick with w_botline. If we invalidate it on each
222***************
223*** 3564,3570 ****
224 }
225
226 /* When still displaying '$' of change command, stop at cursor */
227! if (dollar_vcol != 0 && wp == curwin
228 && lnum == wp->w_cursor.lnum && vcol >= (long)wp->w_virtcol
229 #ifdef FEAT_DIFF
230 && filler_todo <= 0
231--- 3564,3570 ----
232 }
233
234 /* When still displaying '$' of change command, stop at cursor */
235! if (dollar_vcol >= 0 && wp == curwin
236 && lnum == wp->w_cursor.lnum && vcol >= (long)wp->w_virtcol
237 #ifdef FEAT_DIFF
238 && filler_todo <= 0
239*** ../vim-7.3.425/src/search.c 2012-01-26 20:58:21.000000000 +0100
240--- src/search.c 2012-02-04 23:23:10.000000000 +0100
241***************
242*** 2501,2508 ****
243 save_siso = p_siso;
244 /* Handle "$" in 'cpo': If the ')' is typed on top of the "$",
245 * stop displaying the "$". */
246! if (dollar_vcol > 0 && dollar_vcol == curwin->w_virtcol)
247! dollar_vcol = 0;
248 ++curwin->w_virtcol; /* do display ')' just before "$" */
249 update_screen(VALID); /* show the new char first */
250
251--- 2501,2508 ----
252 save_siso = p_siso;
253 /* Handle "$" in 'cpo': If the ')' is typed on top of the "$",
254 * stop displaying the "$". */
255! if (dollar_vcol >= 0 && dollar_vcol == curwin->w_virtcol)
256! dollar_vcol = -1;
257 ++curwin->w_virtcol; /* do display ')' just before "$" */
258 update_screen(VALID); /* show the new char first */
259
260*** ../vim-7.3.425/src/version.c 2012-02-04 22:44:27.000000000 +0100
261--- src/version.c 2012-02-04 23:32:55.000000000 +0100
262***************
263*** 716,717 ****
264--- 716,719 ----
265 { /* Add new patch number below this line */
266+ /**/
267+ 426,
268 /**/
269
270
271--
272I am also told that there is a logical proof out there somewhere
273that demonstrates that there is no task which duct tape cannot handle.
274 -- Paul Brannan
275
276 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
277/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
278\\\ an exciting new programming language -- http://www.Zimbu.org ///
279 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///