1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
|
To: vim-dev@vim.org
Subject: Patch 7.3.008
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.008
Problem: 'cursorbind' is kept in places where 'scrollbind' is reset.
Solution: Reset 'cursorbind'.
Files: src/buffer.c, src/diff.c, src/ex_cmds.c, src/ex_cmds2.c,
src/ex_docmd.c, src/ex_getln.c, src/if_cscope.c, src/macros.h,
src/quickfix.c, src/search.c, src/tag.c, src/window.c
*** ../vim-7.3.007/src/buffer.c 2010-08-15 21:57:32.000000000 +0200
--- src/buffer.c 2010-09-21 16:54:19.000000000 +0200
***************
*** 1288,1296 ****
/* Go to the other buffer. */
set_curbuf(buf, action);
! #if defined(FEAT_LISTCMDS) && defined(FEAT_SCROLLBIND)
if (action == DOBUF_SPLIT)
! curwin->w_p_scb = FALSE; /* reset 'scrollbind' */
#endif
#if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
--- 1288,1299 ----
/* Go to the other buffer. */
set_curbuf(buf, action);
! #if defined(FEAT_LISTCMDS) \
! && (defined(FEAT_SCROLLBIND) || defined(FEAT_CURSORBIND))
if (action == DOBUF_SPLIT)
! {
! RESET_BINDING(curwin); /* reset 'scrollbind' and 'cursorbind' */
! }
#endif
#if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
***************
*** 1917,1925 ****
tabpage_new();
else if (win_split(0, 0) == FAIL) /* Open in a new window */
return FAIL;
! # ifdef FEAT_SCROLLBIND
! curwin->w_p_scb = FALSE;
! # endif
}
}
#endif
--- 1920,1926 ----
tabpage_new();
else if (win_split(0, 0) == FAIL) /* Open in a new window */
return FAIL;
! RESET_BINDING(curwin);
}
}
#endif
*** ../vim-7.3.007/src/diff.c 2010-08-15 21:57:32.000000000 +0200
--- src/diff.c 2010-09-21 16:14:07.000000000 +0200
***************
*** 1127,1137 ****
# endif
wp->w_p_diff = TRUE;
#ifdef FEAT_CURSORBIND
- /* Use cursorbind if it's available */
wp->w_p_crb = TRUE;
#endif
- wp->w_p_scb = TRUE;
wp->w_p_wrap = FALSE;
# ifdef FEAT_FOLDING
curwin = wp;
--- 1127,1139 ----
# endif
wp->w_p_diff = TRUE;
+ /* Use 'scrollbind' and 'cursorbind' when available */
+ #ifdef FEAT_SCROLLBIND
+ wp->w_p_scb = TRUE;
+ #endif
#ifdef FEAT_CURSORBIND
wp->w_p_crb = TRUE;
#endif
wp->w_p_wrap = FALSE;
# ifdef FEAT_FOLDING
curwin = wp;
***************
*** 1177,1186 ****
{
/* Set 'diff', 'scrollbind' off and 'wrap' on. */
wp->w_p_diff = FALSE;
! #ifdef FEAT_CURSORBIND
! wp->w_p_crb = FALSE;
! #endif
! wp->w_p_scb = FALSE;
wp->w_p_wrap = TRUE;
#ifdef FEAT_FOLDING
curwin = wp;
--- 1179,1185 ----
{
/* Set 'diff', 'scrollbind' off and 'wrap' on. */
wp->w_p_diff = FALSE;
! RESET_BINDING(wp);
wp->w_p_wrap = TRUE;
#ifdef FEAT_FOLDING
curwin = wp;
*** ../vim-7.3.007/src/ex_cmds.c 2010-08-15 21:57:26.000000000 +0200
--- src/ex_cmds.c 2010-09-21 16:15:07.000000000 +0200
***************
*** 3498,3506 ****
curbuf->b_p_bin = FALSE; /* reset 'bin' before reading file */
curwin->w_p_nu = 0; /* no line numbers */
curwin->w_p_rnu = 0; /* no relative line numbers */
! #ifdef FEAT_SCROLLBIND
! curwin->w_p_scb = FALSE; /* no scroll binding */
! #endif
#ifdef FEAT_ARABIC
curwin->w_p_arab = FALSE; /* no arabic mode */
#endif
--- 3498,3504 ----
curbuf->b_p_bin = FALSE; /* reset 'bin' before reading file */
curwin->w_p_nu = 0; /* no line numbers */
curwin->w_p_rnu = 0; /* no relative line numbers */
! RESET_BINDING(curwin); /* no scroll or cursor binding */
#ifdef FEAT_ARABIC
curwin->w_p_arab = FALSE; /* no arabic mode */
#endif
***************
*** 5471,5479 ****
return FALSE;
curwin->w_p_pvw = TRUE;
curwin->w_p_wfh = TRUE;
! # ifdef FEAT_SCROLLBIND
! curwin->w_p_scb = FALSE; /* don't take over 'scrollbind' */
! # endif
# ifdef FEAT_DIFF
curwin->w_p_diff = FALSE; /* no 'diff' */
# endif
--- 5469,5476 ----
return FALSE;
curwin->w_p_pvw = TRUE;
curwin->w_p_wfh = TRUE;
! RESET_BINDING(curwin); /* don't take over 'scrollbind'
! and 'cursorbind' */
# ifdef FEAT_DIFF
curwin->w_p_diff = FALSE; /* no 'diff' */
# endif
*** ../vim-7.3.007/src/ex_cmds2.c 2010-08-15 21:57:31.000000000 +0200
--- src/ex_cmds2.c 2010-09-21 16:15:17.000000000 +0200
***************
*** 2165,2173 ****
{
if (win_split(0, 0) == FAIL)
return;
! # ifdef FEAT_SCROLLBIND
! curwin->w_p_scb = FALSE;
! # endif
}
else
#endif
--- 2165,2171 ----
{
if (win_split(0, 0) == FAIL)
return;
! RESET_BINDING(curwin);
}
else
#endif
*** ../vim-7.3.007/src/ex_docmd.c 2010-08-16 22:33:55.000000000 +0200
--- src/ex_docmd.c 2010-09-21 16:15:39.000000000 +0200
***************
*** 6898,6906 ****
# ifdef FEAT_WINDOWS
if (win_split(0, 0) == FAIL)
return;
! # ifdef FEAT_SCROLLBIND
! curwin->w_p_scb = FALSE;
! # endif
/* When splitting the window, create a new alist. Otherwise the
* existing one is overwritten. */
--- 6898,6904 ----
# ifdef FEAT_WINDOWS
if (win_split(0, 0) == FAIL)
return;
! RESET_BINDING(curwin);
/* When splitting the window, create a new alist. Otherwise the
* existing one is overwritten. */
***************
*** 7300,7306 ****
|| cmdmod.browse
# endif
)
! curwin->w_p_scb = FALSE;
else
do_check_scrollbind(FALSE);
# endif
--- 7298,7306 ----
|| cmdmod.browse
# endif
)
! {
! RESET_BINDING(curwin);
! }
else
do_check_scrollbind(FALSE);
# endif
*** ../vim-7.3.007/src/ex_getln.c 2010-08-15 21:57:28.000000000 +0200
--- src/ex_getln.c 2010-09-21 16:15:55.000000000 +0200
***************
*** 6147,6155 ****
curwin->w_p_rl = cmdmsg_rl;
cmdmsg_rl = FALSE;
# endif
! # ifdef FEAT_SCROLLBIND
! curwin->w_p_scb = FALSE;
! # endif
# ifdef FEAT_AUTOCMD
/* Do execute autocommands for setting the filetype (load syntax). */
--- 6147,6153 ----
curwin->w_p_rl = cmdmsg_rl;
cmdmsg_rl = FALSE;
# endif
! RESET_BINDING(curwin);
# ifdef FEAT_AUTOCMD
/* Do execute autocommands for setting the filetype (load syntax). */
*** ../vim-7.3.007/src/if_cscope.c 2010-08-15 21:57:32.000000000 +0200
--- src/if_cscope.c 2010-09-21 16:16:26.000000000 +0200
***************
*** 1274,1282 ****
{
win_split(postponed_split > 0 ? postponed_split : 0,
postponed_split_flags);
! # ifdef FEAT_SCROLLBIND
! curwin->w_p_scb = FALSE;
! # endif
postponed_split = 0;
}
# endif
--- 1274,1280 ----
{
win_split(postponed_split > 0 ? postponed_split : 0,
postponed_split_flags);
! RESET_BINDING(curwin);
postponed_split = 0;
}
# endif
*** ../vim-7.3.007/src/macros.h 2010-08-15 21:57:28.000000000 +0200
--- src/macros.h 2010-09-21 16:13:10.000000000 +0200
***************
*** 285,287 ****
--- 285,301 ----
#else
# define DO_AUTOCHDIR
#endif
+
+ #if defined(FEAT_SCROLLBIND) && defined(FEAT_CURSORBIND)
+ # define RESET_BINDING(wp) (wp)->w_p_scb = FALSE; (wp)->w_p_crb = FALSE
+ #else
+ # if defined(FEAT_SCROLLBIND)
+ # define RESET_BINDING(wp) (wp)->w_p_scb = FALSE
+ # else
+ # if defined(FEAT_CURSORBIND)
+ # define RESET_BINDING(wp) (wp)->w_p_crb = FALSE
+ # else
+ # define RESET_BINDING(wp)
+ # endif
+ # endif
+ #endif
*** ../vim-7.3.007/src/quickfix.c 2010-08-17 20:23:18.000000000 +0200
--- src/quickfix.c 2010-09-21 16:17:17.000000000 +0200
***************
*** 1656,1664 ****
opened_window = TRUE; /* close it when fail */
p_swb = empty_option; /* don't split again */
swb_flags = 0;
! # ifdef FEAT_SCROLLBIND
! curwin->w_p_scb = FALSE;
! # endif
if (ll_ref != NULL)
{
/* The new window should use the location list from the
--- 1656,1662 ----
opened_window = TRUE; /* close it when fail */
p_swb = empty_option; /* don't split again */
swb_flags = 0;
! RESET_BINDING(curwin);
if (ll_ref != NULL)
{
/* The new window should use the location list from the
***************
*** 2334,2342 ****
win_goto(lastwin);
if (win_split(height, WSP_BELOW | WSP_NEWLOC) == FAIL)
return; /* not enough room for window */
! #ifdef FEAT_SCROLLBIND
! curwin->w_p_scb = FALSE;
! #endif
if (eap->cmdidx == CMD_lopen || eap->cmdidx == CMD_lwindow)
{
--- 2332,2338 ----
win_goto(lastwin);
if (win_split(height, WSP_BELOW | WSP_NEWLOC) == FAIL)
return; /* not enough room for window */
! RESET_BINDING(curwin);
if (eap->cmdidx == CMD_lopen || eap->cmdidx == CMD_lwindow)
{
*** ../vim-7.3.007/src/search.c 2010-08-15 21:57:32.000000000 +0200
--- src/search.c 2010-09-21 16:17:28.000000000 +0200
***************
*** 5075,5083 ****
if (win_split(0, 0) == FAIL)
#endif
break;
! #ifdef FEAT_SCROLLBIND
! curwin->w_p_scb = FALSE;
! #endif
}
if (depth == -1)
{
--- 5075,5081 ----
if (win_split(0, 0) == FAIL)
#endif
break;
! RESET_BINDING(curwin);
}
if (depth == -1)
{
*** ../vim-7.3.007/src/tag.c 2010-08-15 21:57:25.000000000 +0200
--- src/tag.c 2010-09-21 16:17:51.000000000 +0200
***************
*** 3143,3151 ****
{
win_split(postponed_split > 0 ? postponed_split : 0,
postponed_split_flags);
! # ifdef FEAT_SCROLLBIND
! curwin->w_p_scb = FALSE;
! # endif
}
#endif
--- 3143,3149 ----
{
win_split(postponed_split > 0 ? postponed_split : 0,
postponed_split_flags);
! RESET_BINDING(curwin);
}
#endif
*** ../vim-7.3.007/src/window.c 2010-08-15 21:57:32.000000000 +0200
--- src/window.c 2010-09-21 16:18:44.000000000 +0200
***************
*** 525,533 ****
setpcmark();
if (win_split(0, 0) == OK)
{
! # ifdef FEAT_SCROLLBIND
! curwin->w_p_scb = FALSE;
! # endif
(void)do_ecmd(0, ptr, NULL, NULL, ECMD_LASTL,
ECMD_HIDE, NULL);
if (nchar == 'F' && lnum >= 0)
--- 525,531 ----
setpcmark();
if (win_split(0, 0) == OK)
{
! RESET_BINDING(curwin);
(void)do_ecmd(0, ptr, NULL, NULL, ECMD_LASTL,
ECMD_HIDE, NULL);
if (nchar == 'F' && lnum >= 0)
***************
*** 3277,3285 ****
if (aucmd_win != NULL)
{
win_init_some(aucmd_win, curwin);
! # ifdef FEAT_SCROLLBIND
! aucmd_win->w_p_scb = FALSE;
! # endif
new_frame(aucmd_win);
}
}
--- 3275,3281 ----
if (aucmd_win != NULL)
{
win_init_some(aucmd_win, curwin);
! RESET_BINDING(aucmd_win);
new_frame(aucmd_win);
}
}
***************
*** 3320,3329 ****
/* First window in new tab page, initialize it from "oldwin". */
win_init(curwin, oldwin, 0);
! # ifdef FEAT_SCROLLBIND
! /* We don't want scroll-binding in the first window. */
! curwin->w_p_scb = FALSE;
! # endif
}
#endif
--- 3316,3323 ----
/* First window in new tab page, initialize it from "oldwin". */
win_init(curwin, oldwin, 0);
! /* We don't want cursor- and scroll-binding in the first window. */
! RESET_BINDING(curwin);
}
#endif
*** ../vim-7.3.007/src/version.c 2010-09-21 16:49:29.000000000 +0200
--- src/version.c 2010-09-21 16:53:16.000000000 +0200
***************
*** 716,717 ****
--- 716,719 ----
{ /* Add new patch number below this line */
+ /**/
+ 8,
/**/
--
hundred-and-one symptoms of being an internet addict:
181. You make up words that go with the "happy tune" your modem makes
while dialing your ISP.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|