4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: 'cursorbind' is kept in places where 'scrollbind' is reset.
12 Solution: Reset 'cursorbind'.
13 Files: src/buffer.c, src/diff.c, src/ex_cmds.c, src/ex_cmds2.c,
14 src/ex_docmd.c, src/ex_getln.c, src/if_cscope.c, src/macros.h,
15 src/quickfix.c, src/search.c, src/tag.c, src/window.c
18 *** ../vim-7.3.007/src/buffer.c 2010-08-15 21:57:32.000000000 +0200
19 --- src/buffer.c 2010-09-21 16:54:19.000000000 +0200
22 /* Go to the other buffer. */
23 set_curbuf(buf, action);
25 ! #if defined(FEAT_LISTCMDS) && defined(FEAT_SCROLLBIND)
26 if (action == DOBUF_SPLIT)
27 ! curwin->w_p_scb = FALSE; /* reset 'scrollbind' */
30 #if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
32 /* Go to the other buffer. */
33 set_curbuf(buf, action);
35 ! #if defined(FEAT_LISTCMDS) \
36 ! && (defined(FEAT_SCROLLBIND) || defined(FEAT_CURSORBIND))
37 if (action == DOBUF_SPLIT)
39 ! RESET_BINDING(curwin); /* reset 'scrollbind' and 'cursorbind' */
43 #if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
47 else if (win_split(0, 0) == FAIL) /* Open in a new window */
49 ! # ifdef FEAT_SCROLLBIND
50 ! curwin->w_p_scb = FALSE;
57 else if (win_split(0, 0) == FAIL) /* Open in a new window */
59 ! RESET_BINDING(curwin);
63 *** ../vim-7.3.007/src/diff.c 2010-08-15 21:57:32.000000000 +0200
64 --- src/diff.c 2010-09-21 16:14:07.000000000 +0200
70 #ifdef FEAT_CURSORBIND
71 - /* Use cursorbind if it's available */
82 + /* Use 'scrollbind' and 'cursorbind' when available */
83 + #ifdef FEAT_SCROLLBIND
86 #ifdef FEAT_CURSORBIND
95 /* Set 'diff', 'scrollbind' off and 'wrap' on. */
97 ! #ifdef FEAT_CURSORBIND
98 ! wp->w_p_crb = FALSE;
100 ! wp->w_p_scb = FALSE;
106 /* Set 'diff', 'scrollbind' off and 'wrap' on. */
107 wp->w_p_diff = FALSE;
112 *** ../vim-7.3.007/src/ex_cmds.c 2010-08-15 21:57:26.000000000 +0200
113 --- src/ex_cmds.c 2010-09-21 16:15:07.000000000 +0200
116 curbuf->b_p_bin = FALSE; /* reset 'bin' before reading file */
117 curwin->w_p_nu = 0; /* no line numbers */
118 curwin->w_p_rnu = 0; /* no relative line numbers */
119 ! #ifdef FEAT_SCROLLBIND
120 ! curwin->w_p_scb = FALSE; /* no scroll binding */
123 curwin->w_p_arab = FALSE; /* no arabic mode */
126 curbuf->b_p_bin = FALSE; /* reset 'bin' before reading file */
127 curwin->w_p_nu = 0; /* no line numbers */
128 curwin->w_p_rnu = 0; /* no relative line numbers */
129 ! RESET_BINDING(curwin); /* no scroll or cursor binding */
131 curwin->w_p_arab = FALSE; /* no arabic mode */
136 curwin->w_p_pvw = TRUE;
137 curwin->w_p_wfh = TRUE;
138 ! # ifdef FEAT_SCROLLBIND
139 ! curwin->w_p_scb = FALSE; /* don't take over 'scrollbind' */
142 curwin->w_p_diff = FALSE; /* no 'diff' */
146 curwin->w_p_pvw = TRUE;
147 curwin->w_p_wfh = TRUE;
148 ! RESET_BINDING(curwin); /* don't take over 'scrollbind'
149 ! and 'cursorbind' */
151 curwin->w_p_diff = FALSE; /* no 'diff' */
153 *** ../vim-7.3.007/src/ex_cmds2.c 2010-08-15 21:57:31.000000000 +0200
154 --- src/ex_cmds2.c 2010-09-21 16:15:17.000000000 +0200
158 if (win_split(0, 0) == FAIL)
160 ! # ifdef FEAT_SCROLLBIND
161 ! curwin->w_p_scb = FALSE;
168 if (win_split(0, 0) == FAIL)
170 ! RESET_BINDING(curwin);
174 *** ../vim-7.3.007/src/ex_docmd.c 2010-08-16 22:33:55.000000000 +0200
175 --- src/ex_docmd.c 2010-09-21 16:15:39.000000000 +0200
179 if (win_split(0, 0) == FAIL)
181 ! # ifdef FEAT_SCROLLBIND
182 ! curwin->w_p_scb = FALSE;
185 /* When splitting the window, create a new alist. Otherwise the
186 * existing one is overwritten. */
189 if (win_split(0, 0) == FAIL)
191 ! RESET_BINDING(curwin);
193 /* When splitting the window, create a new alist. Otherwise the
194 * existing one is overwritten. */
200 ! curwin->w_p_scb = FALSE;
202 do_check_scrollbind(FALSE);
209 ! RESET_BINDING(curwin);
212 do_check_scrollbind(FALSE);
214 *** ../vim-7.3.007/src/ex_getln.c 2010-08-15 21:57:28.000000000 +0200
215 --- src/ex_getln.c 2010-09-21 16:15:55.000000000 +0200
218 curwin->w_p_rl = cmdmsg_rl;
221 ! # ifdef FEAT_SCROLLBIND
222 ! curwin->w_p_scb = FALSE;
226 /* Do execute autocommands for setting the filetype (load syntax). */
228 curwin->w_p_rl = cmdmsg_rl;
231 ! RESET_BINDING(curwin);
234 /* Do execute autocommands for setting the filetype (load syntax). */
235 *** ../vim-7.3.007/src/if_cscope.c 2010-08-15 21:57:32.000000000 +0200
236 --- src/if_cscope.c 2010-09-21 16:16:26.000000000 +0200
240 win_split(postponed_split > 0 ? postponed_split : 0,
241 postponed_split_flags);
242 ! # ifdef FEAT_SCROLLBIND
243 ! curwin->w_p_scb = FALSE;
250 win_split(postponed_split > 0 ? postponed_split : 0,
251 postponed_split_flags);
252 ! RESET_BINDING(curwin);
256 *** ../vim-7.3.007/src/macros.h 2010-08-15 21:57:28.000000000 +0200
257 --- src/macros.h 2010-09-21 16:13:10.000000000 +0200
262 # define DO_AUTOCHDIR
265 + #if defined(FEAT_SCROLLBIND) && defined(FEAT_CURSORBIND)
266 + # define RESET_BINDING(wp) (wp)->w_p_scb = FALSE; (wp)->w_p_crb = FALSE
268 + # if defined(FEAT_SCROLLBIND)
269 + # define RESET_BINDING(wp) (wp)->w_p_scb = FALSE
271 + # if defined(FEAT_CURSORBIND)
272 + # define RESET_BINDING(wp) (wp)->w_p_crb = FALSE
274 + # define RESET_BINDING(wp)
278 *** ../vim-7.3.007/src/quickfix.c 2010-08-17 20:23:18.000000000 +0200
279 --- src/quickfix.c 2010-09-21 16:17:17.000000000 +0200
282 opened_window = TRUE; /* close it when fail */
283 p_swb = empty_option; /* don't split again */
285 ! # ifdef FEAT_SCROLLBIND
286 ! curwin->w_p_scb = FALSE;
290 /* The new window should use the location list from the
292 opened_window = TRUE; /* close it when fail */
293 p_swb = empty_option; /* don't split again */
295 ! RESET_BINDING(curwin);
298 /* The new window should use the location list from the
302 if (win_split(height, WSP_BELOW | WSP_NEWLOC) == FAIL)
303 return; /* not enough room for window */
304 ! #ifdef FEAT_SCROLLBIND
305 ! curwin->w_p_scb = FALSE;
308 if (eap->cmdidx == CMD_lopen || eap->cmdidx == CMD_lwindow)
312 if (win_split(height, WSP_BELOW | WSP_NEWLOC) == FAIL)
313 return; /* not enough room for window */
314 ! RESET_BINDING(curwin);
316 if (eap->cmdidx == CMD_lopen || eap->cmdidx == CMD_lwindow)
318 *** ../vim-7.3.007/src/search.c 2010-08-15 21:57:32.000000000 +0200
319 --- src/search.c 2010-09-21 16:17:28.000000000 +0200
322 if (win_split(0, 0) == FAIL)
325 ! #ifdef FEAT_SCROLLBIND
326 ! curwin->w_p_scb = FALSE;
332 if (win_split(0, 0) == FAIL)
335 ! RESET_BINDING(curwin);
339 *** ../vim-7.3.007/src/tag.c 2010-08-15 21:57:25.000000000 +0200
340 --- src/tag.c 2010-09-21 16:17:51.000000000 +0200
344 win_split(postponed_split > 0 ? postponed_split : 0,
345 postponed_split_flags);
346 ! # ifdef FEAT_SCROLLBIND
347 ! curwin->w_p_scb = FALSE;
354 win_split(postponed_split > 0 ? postponed_split : 0,
355 postponed_split_flags);
356 ! RESET_BINDING(curwin);
360 *** ../vim-7.3.007/src/window.c 2010-08-15 21:57:32.000000000 +0200
361 --- src/window.c 2010-09-21 16:18:44.000000000 +0200
365 if (win_split(0, 0) == OK)
367 ! # ifdef FEAT_SCROLLBIND
368 ! curwin->w_p_scb = FALSE;
370 (void)do_ecmd(0, ptr, NULL, NULL, ECMD_LASTL,
372 if (nchar == 'F' && lnum >= 0)
375 if (win_split(0, 0) == OK)
377 ! RESET_BINDING(curwin);
378 (void)do_ecmd(0, ptr, NULL, NULL, ECMD_LASTL,
380 if (nchar == 'F' && lnum >= 0)
383 if (aucmd_win != NULL)
385 win_init_some(aucmd_win, curwin);
386 ! # ifdef FEAT_SCROLLBIND
387 ! aucmd_win->w_p_scb = FALSE;
389 new_frame(aucmd_win);
393 if (aucmd_win != NULL)
395 win_init_some(aucmd_win, curwin);
396 ! RESET_BINDING(aucmd_win);
397 new_frame(aucmd_win);
402 /* First window in new tab page, initialize it from "oldwin". */
403 win_init(curwin, oldwin, 0);
405 ! # ifdef FEAT_SCROLLBIND
406 ! /* We don't want scroll-binding in the first window. */
407 ! curwin->w_p_scb = FALSE;
413 /* First window in new tab page, initialize it from "oldwin". */
414 win_init(curwin, oldwin, 0);
416 ! /* We don't want cursor- and scroll-binding in the first window. */
417 ! RESET_BINDING(curwin);
421 *** ../vim-7.3.007/src/version.c 2010-09-21 16:49:29.000000000 +0200
422 --- src/version.c 2010-09-21 16:53:16.000000000 +0200
426 { /* Add new patch number below this line */
432 hundred-and-one symptoms of being an internet addict:
433 181. You make up words that go with the "happy tune" your modem makes
434 while dialing your ISP.
436 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
437 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
438 \\\ download, build and distribute -- http://www.A-A-P.org ///
439 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///