To: vim_dev@googlegroups.com Subject: Patch 8.0.1566 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1566 Problem: Too many #ifdefs. Solution: Graduate FEAT_SCROLLBIND and FEAT_CURSORBIND. Files: src/buffer.c, src/diff.c, src/edit.c, src/evalfunc.c, src/ex_cmds.c, src/ex_cmds2.c, src/ex_docmd.c, src/gui.c, src/main.c, src/move.c, src/normal.c, src/option.c, src/term.c, src/version.c, src/window.c, src/globals.h, src/macros.h, src/option.h, src/structs.h *** ../vim-8.0.1565/src/buffer.c 2018-03-04 18:07:04.240592526 +0100 --- src/buffer.c 2018-03-04 19:50:54.953096006 +0100 *************** *** 1583,1590 **** /* 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' */ --- 1583,1589 ---- /* Go to the other buffer. */ set_curbuf(buf, action); ! #if defined(FEAT_LISTCMDS) if (action == DOBUF_SPLIT) { RESET_BINDING(curwin); /* reset 'scrollbind' and 'cursorbind' */ *** ../vim-8.0.1565/src/diff.c 2018-03-04 18:07:04.240592526 +0100 --- src/diff.c 2018-03-04 19:57:17.042650637 +0100 *************** *** 1160,1175 **** # endif /* Use 'scrollbind' and 'cursorbind' when available */ - #ifdef FEAT_SCROLLBIND if (!wp->w_p_diff) wp->w_p_scb_save = wp->w_p_scb; wp->w_p_scb = TRUE; - #endif - #ifdef FEAT_CURSORBIND if (!wp->w_p_diff) wp->w_p_crb_save = wp->w_p_crb; wp->w_p_crb = TRUE; - #endif if (!wp->w_p_diff) wp->w_p_wrap_save = wp->w_p_wrap; wp->w_p_wrap = FALSE; --- 1160,1171 ---- *************** *** 1199,1208 **** /* make sure topline is not halfway a fold */ changed_window_setting_win(wp); # endif - #ifdef FEAT_SCROLLBIND if (vim_strchr(p_sbo, 'h') == NULL) do_cmdline_cmd((char_u *)"set sbo+=hor"); - #endif /* Save the current values, to be restored in ex_diffoff(). */ wp->w_p_diff_saved = TRUE; --- 1195,1202 ---- *************** *** 1221,1229 **** ex_diffoff(exarg_T *eap) { win_T *wp; - #ifdef FEAT_SCROLLBIND int diffwin = FALSE; - #endif FOR_ALL_WINDOWS(wp) { --- 1215,1221 ---- *************** *** 1237,1250 **** if (wp->w_p_diff_saved) { - #ifdef FEAT_SCROLLBIND if (wp->w_p_scb) wp->w_p_scb = wp->w_p_scb_save; - #endif - #ifdef FEAT_CURSORBIND if (wp->w_p_crb) wp->w_p_crb = wp->w_p_crb_save; - #endif if (!wp->w_p_wrap) wp->w_p_wrap = wp->w_p_wrap_save; #ifdef FEAT_FOLDING --- 1229,1238 ---- *************** *** 1276,1295 **** /* Note: 'sbo' is not restored, it's a global option. */ diff_buf_adjust(wp); } - #ifdef FEAT_SCROLLBIND diffwin |= wp->w_p_diff; - #endif } /* Also remove hidden buffers from the list. */ if (eap->forceit) diff_buf_clear(); - #ifdef FEAT_SCROLLBIND /* Remove "hor" from from 'scrollopt' if there are no diff windows left. */ if (!diffwin && vim_strchr(p_sbo, 'h') != NULL) do_cmdline_cmd((char_u *)"set sbo-=hor"); - #endif } /* --- 1264,1279 ---- *** ../vim-8.0.1565/src/edit.c 2018-03-04 18:07:04.244592500 +0100 --- src/edit.c 2018-03-04 20:06:00.503260859 +0100 *************** *** 764,778 **** */ ins_redraw(TRUE); - #ifdef FEAT_SCROLLBIND if (curwin->w_p_scb) do_check_scrollbind(TRUE); - #endif - #ifdef FEAT_CURSORBIND if (curwin->w_p_crb) do_check_cursorbind(); - #endif update_curswant(); old_topline = curwin->w_topline; #ifdef FEAT_DIFF --- 764,774 ---- *** ../vim-8.0.1565/src/evalfunc.c 2018-03-04 18:07:04.248592476 +0100 --- src/evalfunc.c 2018-03-04 20:06:04.755232948 +0100 *************** *** 5852,5860 **** #ifdef FEAT_CSCOPE "cscope", #endif - #ifdef FEAT_CURSORBIND "cursorbind", - #endif #ifdef CURSOR_SHAPE "cursorshape", #endif --- 5852,5858 ---- *************** *** 6104,6112 **** #if defined(FEAT_RUBY) && !defined(DYNAMIC_RUBY) "ruby", #endif - #ifdef FEAT_SCROLLBIND "scrollbind", - #endif #ifdef FEAT_CMDL_INFO "showcmd", "cmdline_info", --- 6102,6108 ---- *** ../vim-8.0.1565/src/ex_cmds.c 2018-03-04 18:07:04.248592476 +0100 --- src/ex_cmds.c 2018-03-04 20:06:15.539162163 +0100 *************** *** 4318,4326 **** if (topline == 0 && command == NULL) p_so = 999; /* force cursor halfway the window */ update_topline(); - #ifdef FEAT_SCROLLBIND curwin->w_scbind_pos = curwin->w_topline; - #endif p_so = n; redraw_curbuf_later(NOT_VALID); /* redraw this buffer later */ } --- 4318,4324 ---- *************** *** 5270,5279 **** setmouse(); /* disable mouse in xterm */ #endif curwin->w_cursor.col = regmatch.startpos[0].col; - #ifdef FEAT_CURSORBIND if (curwin->w_p_crb) do_check_cursorbind(); - #endif /* When 'cpoptions' contains "u" don't sync undo when * asking for confirmation. */ --- 5268,5275 ---- *** ../vim-8.0.1565/src/ex_cmds2.c 2018-03-04 18:07:04.252592449 +0100 --- src/ex_cmds2.c 2018-03-04 19:58:12.150298309 +0100 *************** *** 3232,3242 **** if (eap->cmdidx == CMD_windo) { validate_cursor(); /* cursor may have moved */ ! #ifdef FEAT_SCROLLBIND /* required when 'scrollbind' has been set */ if (curwin->w_p_scb) do_check_scrollbind(TRUE); - #endif } if (eap->cmdidx == CMD_windo || eap->cmdidx == CMD_tabdo) --- 3232,3241 ---- if (eap->cmdidx == CMD_windo) { validate_cursor(); /* cursor may have moved */ ! /* required when 'scrollbind' has been set */ if (curwin->w_p_scb) do_check_scrollbind(TRUE); } if (eap->cmdidx == CMD_windo || eap->cmdidx == CMD_tabdo) *** ../vim-8.0.1565/src/ex_docmd.c 2018-03-04 18:07:04.252592449 +0100 --- src/ex_docmd.c 2018-03-04 19:58:41.230112423 +0100 *************** *** 8263,8282 **** else if (win_split(eap->addr_count > 0 ? (int)eap->line2 : 0, *eap->cmd == 'v' ? WSP_VERT : 0) != FAIL) { - # ifdef FEAT_SCROLLBIND /* Reset 'scrollbind' when editing another file, but keep it when * doing ":split" without arguments. */ if (*eap->arg != NUL ! # ifdef FEAT_BROWSE || cmdmod.browse ! # endif ) { RESET_BINDING(curwin); } else do_check_scrollbind(FALSE); - # endif do_exedit(eap, old_curwin); } --- 8263,8280 ---- else if (win_split(eap->addr_count > 0 ? (int)eap->line2 : 0, *eap->cmd == 'v' ? WSP_VERT : 0) != FAIL) { /* Reset 'scrollbind' when editing another file, but keep it when * doing ":split" without arguments. */ if (*eap->arg != NUL ! # ifdef FEAT_BROWSE || cmdmod.browse ! # endif ) { RESET_BINDING(curwin); } else do_check_scrollbind(FALSE); do_exedit(eap, old_curwin); } *************** *** 8768,8774 **** static void ex_syncbind(exarg_T *eap UNUSED) { - #ifdef FEAT_SCROLLBIND win_T *wp; win_T *save_curwin = curwin; buf_T *save_curbuf = curbuf; --- 8766,8771 ---- *************** *** 8836,8842 **** ins_typebuf(ctrl_o, REMAP_NONE, 0, TRUE, FALSE); } } - #endif } --- 8833,8838 ---- *** ../vim-8.0.1565/src/gui.c 2018-03-04 18:07:04.256592423 +0100 --- src/gui.c 2018-03-04 19:59:10.609924645 +0100 *************** *** 3959,3967 **** int sb_num; #ifdef USE_ON_FLY_SCROLL colnr_T old_leftcol = curwin->w_leftcol; - # ifdef FEAT_SCROLLBIND linenr_T old_topline = curwin->w_topline; - # endif # ifdef FEAT_DIFF int old_topfill = curwin->w_topfill; # endif --- 3959,3965 ---- *************** *** 4126,4141 **** } #ifdef USE_ON_FLY_SCROLL - # ifdef FEAT_SCROLLBIND /* * synchronize other windows, as necessary according to 'scrollbind' */ if (curwin->w_p_scb && ((sb->wp == NULL && curwin->w_leftcol != old_leftcol) || (sb->wp == curwin && (curwin->w_topline != old_topline ! # ifdef FEAT_DIFF || curwin->w_topfill != old_topfill ! # endif )))) { do_check_scrollbind(TRUE); --- 4124,4138 ---- } #ifdef USE_ON_FLY_SCROLL /* * synchronize other windows, as necessary according to 'scrollbind' */ if (curwin->w_p_scb && ((sb->wp == NULL && curwin->w_leftcol != old_leftcol) || (sb->wp == curwin && (curwin->w_topline != old_topline ! # ifdef FEAT_DIFF || curwin->w_topfill != old_topfill ! # endif )))) { do_check_scrollbind(TRUE); *************** *** 4145,4151 **** updateWindow(wp); setcursor(); } - # endif out_flush_cursor(FALSE, TRUE); #else add_to_input_buf(bytes, byte_count); --- 4142,4147 ---- *************** *** 4474,4482 **** } if (old_cursor.lnum != wp->w_cursor.lnum) coladvance(wp->w_curswant); - #ifdef FEAT_SCROLLBIND wp->w_scbind_pos = wp->w_topline; - #endif } /* Make sure wp->w_leftcol and wp->w_skipcol are correct. */ --- 4470,4476 ---- *** ../vim-8.0.1565/src/main.c 2018-03-04 18:07:04.256592423 +0100 --- src/main.c 2018-03-04 19:59:29.237805599 +0100 *************** *** 857,863 **** } #endif ! #if defined(FEAT_DIFF) && defined(FEAT_SCROLLBIND) /* When a startup script or session file setup for diff'ing and * scrollbind, sync the scrollbind now. */ if (curwin->w_p_diff && curwin->w_p_scb) --- 857,863 ---- } #endif ! #if defined(FEAT_DIFF) /* When a startup script or session file setup for diff'ing and * scrollbind, sync the scrollbind now. */ if (curwin->w_p_diff && curwin->w_p_scb) *************** *** 1193,1199 **** curbuf->b_last_changedtick = CHANGEDTICK(curbuf); } ! #if defined(FEAT_DIFF) && defined(FEAT_SCROLLBIND) /* Scroll-binding for diff mode may have been postponed until * here. Avoids doing it for every change. */ if (diff_need_scrollbind) --- 1193,1199 ---- curbuf->b_last_changedtick = CHANGEDTICK(curbuf); } ! #if defined(FEAT_DIFF) /* Scroll-binding for diff mode may have been postponed until * here. Avoids doing it for every change. */ if (diff_need_scrollbind) *** ../vim-8.0.1565/src/move.c 2018-03-04 18:07:04.264592373 +0100 --- src/move.c 2018-03-04 20:06:26.191092250 +0100 *************** *** 184,192 **** curwin->w_topline = curwin->w_cursor.lnum; curwin->w_botline = curwin->w_topline; curwin->w_valid |= VALID_BOTLINE|VALID_BOTLINE_AP; - #ifdef FEAT_SCROLLBIND curwin->w_scbind_pos = 1; - #endif return; } --- 184,190 ---- *************** *** 215,223 **** curwin->w_topline = 1; curwin->w_botline = 2; curwin->w_valid |= VALID_BOTLINE|VALID_BOTLINE_AP; - #ifdef FEAT_SCROLLBIND curwin->w_scbind_pos = 1; - #endif } /* --- 213,219 ---- *************** *** 2773,2779 **** redraw_later(VALID); } - #if defined(FEAT_CURSORBIND) || defined(PROTO) void do_check_cursorbind(void) { --- 2769,2774 ---- *************** *** 2846,2849 **** curwin = old_curwin; curbuf = old_curbuf; } - #endif /* FEAT_CURSORBIND */ --- 2841,2843 ---- *** ../vim-8.0.1565/src/normal.c 2018-03-04 18:07:04.268592346 +0100 --- src/normal.c 2018-03-04 19:59:58.949615739 +0100 *************** *** 1275,1295 **** mb_adjust_cursor(); #endif - #ifdef FEAT_SCROLLBIND if (curwin->w_p_scb && toplevel) { validate_cursor(); /* may need to update w_leftcol */ do_check_scrollbind(TRUE); } - #endif - #ifdef FEAT_CURSORBIND if (curwin->w_p_crb && toplevel) { validate_cursor(); /* may need to update w_leftcol */ do_check_cursorbind(); } - #endif #ifdef FEAT_TERMINAL /* don't go to Insert mode if a terminal has a running job */ --- 1275,1291 ---- *************** *** 3980,3986 **** } #endif - #ifdef FEAT_SCROLLBIND /* * When "check" is FALSE, prepare for commands that scroll the window. * When "check" is TRUE, take care of scroll-binding after the window has --- 3976,3981 ---- *************** *** 4139,4145 **** curwin = old_curwin; curbuf = old_curbuf; } - #endif /* #ifdef FEAT_SCROLLBIND */ /* * Command character that's ignored. --- 4134,4139 ---- *** ../vim-8.0.1565/src/option.c 2018-03-04 18:07:04.272592321 +0100 --- src/option.c 2018-03-04 20:06:48.890943278 +0100 *************** *** 227,235 **** # define PV_RL OPT_WIN(WV_RL) # define PV_RLC OPT_WIN(WV_RLC) #endif ! #ifdef FEAT_SCROLLBIND ! # define PV_SCBIND OPT_WIN(WV_SCBIND) ! #endif #define PV_SCROLL OPT_WIN(WV_SCROLL) #ifdef FEAT_SPELL # define PV_SPELL OPT_WIN(WV_SPELL) --- 227,233 ---- # define PV_RL OPT_WIN(WV_RL) # define PV_RLC OPT_WIN(WV_RLC) #endif ! #define PV_SCBIND OPT_WIN(WV_SCBIND) #define PV_SCROLL OPT_WIN(WV_SCROLL) #ifdef FEAT_SPELL # define PV_SPELL OPT_WIN(WV_SPELL) *************** *** 246,254 **** # define PV_WFH OPT_WIN(WV_WFH) # define PV_WFW OPT_WIN(WV_WFW) #define PV_WRAP OPT_WIN(WV_WRAP) ! #ifdef FEAT_CURSORBIND ! # define PV_CRBIND OPT_WIN(WV_CRBIND) ! #endif #ifdef FEAT_CONCEAL # define PV_COCU OPT_WIN(WV_COCU) # define PV_COLE OPT_WIN(WV_COLE) --- 244,250 ---- # define PV_WFH OPT_WIN(WV_WFH) # define PV_WFW OPT_WIN(WV_WFW) #define PV_WRAP OPT_WIN(WV_WRAP) ! #define PV_CRBIND OPT_WIN(WV_CRBIND) #ifdef FEAT_CONCEAL # define PV_COCU OPT_WIN(WV_COCU) # define PV_COLE OPT_WIN(WV_COLE) *************** *** 976,986 **** #endif {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, {"cursorbind", "crb", P_BOOL|P_VI_DEF, - #ifdef FEAT_CURSORBIND (char_u *)VAR_WIN, PV_CRBIND, - #else - (char_u *)NULL, PV_NONE, - #endif {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, {"cursorcolumn", "cuc", P_BOOL|P_VI_DEF|P_RWIN, #ifdef FEAT_SYN_HL --- 972,978 ---- *************** *** 2382,2392 **** (char_u *)VAR_WIN, PV_SCROLL, {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, {"scrollbind", "scb", P_BOOL|P_VI_DEF, - #ifdef FEAT_SCROLLBIND (char_u *)VAR_WIN, PV_SCBIND, - #else - (char_u *)NULL, PV_NONE, - #endif {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, {"scrolljump", "sj", P_NUM|P_VI_DEF|P_VIM, (char_u *)&p_sj, PV_NONE, --- 2374,2380 ---- *************** *** 2395,2407 **** (char_u *)&p_so, PV_NONE, {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, {"scrollopt", "sbo", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, - #ifdef FEAT_SCROLLBIND (char_u *)&p_sbo, PV_NONE, {(char_u *)"ver,jump", (char_u *)0L} - #else - (char_u *)NULL, PV_NONE, - {(char_u *)0L, (char_u *)0L} - #endif SCRIPTID_INIT}, {"sections", "sect", P_STRING|P_VI_DEF, (char_u *)&p_sections, PV_NONE, --- 2383,2390 ---- *************** *** 3230,3238 **** #ifdef FEAT_BROWSE static char *(p_bsdir_values[]) = {"current", "last", "buffer", NULL}; #endif - #ifdef FEAT_SCROLLBIND static char *(p_scbopt_values[]) = {"ver", "hor", "jump", NULL}; - #endif static char *(p_debug_values[]) = {"msg", "throw", "beep", NULL}; static char *(p_ead_values[]) = {"both", "ver", "hor", NULL}; static char *(p_buftype_values[]) = {"nofile", "nowrite", "quickfix", "help", "terminal", "acwrite", NULL}; --- 3213,3219 ---- *************** *** 6240,6252 **** #endif /* 'scrollopt' */ - #ifdef FEAT_SCROLLBIND else if (varp == &p_sbo) { if (check_opt_strings(p_sbo, p_scbopt_values, TRUE) != OK) errmsg = e_invarg; } - #endif /* 'ambiwidth' */ #ifdef FEAT_MBYTE --- 6221,6231 ---- *************** *** 8328,8334 **** } #endif - #ifdef FEAT_SCROLLBIND /* when 'scrollbind' is set: snapshot the current position to avoid a jump * at the end of normal_cmd() */ else if ((int *)varp == &curwin->w_p_scb) --- 8307,8312 ---- *************** *** 8339,8345 **** curwin->w_scbind_pos = curwin->w_topline; } } - #endif #if defined(FEAT_QUICKFIX) /* There can be only one window with 'previewwindow' set. */ --- 8317,8322 ---- *************** *** 10688,10699 **** case PV_BRI: return (char_u *)&(curwin->w_p_bri); case PV_BRIOPT: return (char_u *)&(curwin->w_p_briopt); #endif - #ifdef FEAT_SCROLLBIND case PV_SCBIND: return (char_u *)&(curwin->w_p_scb); - #endif - #ifdef FEAT_CURSORBIND case PV_CRBIND: return (char_u *)&(curwin->w_p_crb); - #endif #ifdef FEAT_CONCEAL case PV_COCU: return (char_u *)&(curwin->w_p_cocu); case PV_COLE: return (char_u *)&(curwin->w_p_cole); --- 10665,10672 ---- *************** *** 10878,10891 **** to->wo_bri = from->wo_bri; to->wo_briopt = vim_strsave(from->wo_briopt); #endif - #ifdef FEAT_SCROLLBIND to->wo_scb = from->wo_scb; to->wo_scb_save = from->wo_scb_save; - #endif - #ifdef FEAT_CURSORBIND to->wo_crb = from->wo_crb; to->wo_crb_save = from->wo_crb_save; - #endif #ifdef FEAT_SPELL to->wo_spell = from->wo_spell; #endif --- 10851,10860 ---- *** ../vim-8.0.1565/src/term.c 2018-03-04 18:07:04.284592244 +0100 --- src/term.c 2018-03-04 20:00:50.437286788 +0100 *************** *** 3297,3306 **** } else { - #ifdef FEAT_SCROLLBIND if (curwin->w_p_scb) do_check_scrollbind(TRUE); - #endif if (State & CMDLINE) { update_screen(NOT_VALID); --- 3297,3304 ---- *** ../vim-8.0.1565/src/version.c 2018-03-04 18:56:59.817710013 +0100 --- src/version.c 2018-03-04 20:09:42.497804711 +0100 *************** *** 168,178 **** #else "-cscope", #endif - #ifdef FEAT_CURSORBIND "+cursorbind", - #else - "-cursorbind", - #endif #ifdef CURSOR_SHAPE "+cursorshape", #else --- 168,174 ---- *************** *** 556,566 **** #else "-ruby", #endif - #ifdef FEAT_SCROLLBIND "+scrollbind", - #else - "-scrollbind", - #endif #ifdef FEAT_SIGNS "+signs", #else --- 552,558 ---- *** ../vim-8.0.1565/src/window.c 2018-03-04 18:07:04.288592219 +0100 --- src/window.c 2018-03-04 20:01:19.781099346 +0100 *************** *** 4498,4506 **** #endif new_wp->w_botline = 2; new_wp->w_cursor.lnum = 1; - #ifdef FEAT_SCROLLBIND new_wp->w_scbind_pos = 1; - #endif /* We won't calculate w_fraction until resizing the window */ new_wp->w_fraction = 0; --- 4498,4504 ---- *************** *** 5659,5669 **** /* Don't change w_topline when height is zero. Don't set w_topline when * 'scrollbind' is set and this isn't the current window. */ ! if (height > 0 ! #ifdef FEAT_SCROLLBIND ! && (!wp->w_p_scb || wp == curwin) ! #endif ! ) { /* * Find a value for w_topline that shows the cursor at the same --- 5657,5663 ---- /* Don't change w_topline when height is zero. Don't set w_topline when * 'scrollbind' is set and this isn't the current window. */ ! if (height > 0 && (!wp->w_p_scb || wp == curwin)) { /* * Find a value for w_topline that shows the cursor at the same *** ../vim-8.0.1565/src/globals.h 2018-03-04 18:07:04.256592423 +0100 --- src/globals.h 2018-03-04 20:01:40.884964554 +0100 *************** *** 728,734 **** EXTERN int end_comment_pending INIT(= NUL); #endif - #ifdef FEAT_SCROLLBIND /* * This flag is set after a ":syncbind" to let the check_scrollbind() function * know that it should not attempt to perform scrollbinding due to the scroll --- 728,733 ---- *************** *** 736,742 **** * undo some of the work done by ":syncbind.") -ralston */ EXTERN int did_syncbind INIT(= FALSE); - #endif #ifdef FEAT_SMARTINDENT /* --- 735,740 ---- *** ../vim-8.0.1565/src/macros.h 2018-02-10 18:45:21.064822187 +0100 --- src/macros.h 2018-03-04 20:01:55.300871850 +0100 *************** *** 294,312 **** # 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 #ifdef FEAT_DIFF # define PLINES_NOFILL(x) plines_nofill(x) --- 294,300 ---- # define DO_AUTOCHDIR #endif ! #define RESET_BINDING(wp) (wp)->w_p_scb = FALSE; (wp)->w_p_crb = FALSE #ifdef FEAT_DIFF # define PLINES_NOFILL(x) plines_nofill(x) *** ../vim-8.0.1565/src/option.h 2018-03-04 18:07:04.272592321 +0100 --- src/option.h 2018-03-04 20:07:20.434736305 +0100 *************** *** 739,747 **** EXTERN char_u *p_rtp; /* 'runtimepath' */ EXTERN long p_sj; /* 'scrolljump' */ EXTERN long p_so; /* 'scrolloff' */ - #ifdef FEAT_SCROLLBIND EXTERN char_u *p_sbo; /* 'scrollopt' */ - #endif EXTERN char_u *p_sections; /* 'sections' */ EXTERN int p_secure; /* 'secure' */ EXTERN char_u *p_sel; /* 'selection' */ --- 739,745 ---- *************** *** 1133,1141 **** , WV_TK , WV_TMS #endif - #ifdef FEAT_CURSORBIND , WV_CRBIND - #endif #ifdef FEAT_LINEBREAK , WV_BRI , WV_BRIOPT --- 1131,1137 ---- *************** *** 1172,1180 **** , WV_RL , WV_RLC #endif - #ifdef FEAT_SCROLLBIND , WV_SCBIND - #endif , WV_SCROLL #ifdef FEAT_SPELL , WV_SPELL --- 1168,1174 ---- *** ../vim-8.0.1565/src/structs.h 2018-03-04 18:07:04.280592270 +0100 --- src/structs.h 2018-03-04 20:07:29.222678652 +0100 *************** *** 244,257 **** char_u *wo_stl; #define w_p_stl w_onebuf_opt.wo_stl /* 'statusline' */ #endif - #ifdef FEAT_SCROLLBIND int wo_scb; ! # define w_p_scb w_onebuf_opt.wo_scb /* 'scrollbind' */ int wo_diff_saved; /* options were saved for starting diff mode */ ! # define w_p_diff_saved w_onebuf_opt.wo_diff_saved int wo_scb_save; /* 'scrollbind' saved for diff mode*/ ! # define w_p_scb_save w_onebuf_opt.wo_scb_save ! #endif int wo_wrap; #define w_p_wrap w_onebuf_opt.wo_wrap /* 'wrap' */ #ifdef FEAT_DIFF --- 244,255 ---- char_u *wo_stl; #define w_p_stl w_onebuf_opt.wo_stl /* 'statusline' */ #endif int wo_scb; ! #define w_p_scb w_onebuf_opt.wo_scb /* 'scrollbind' */ int wo_diff_saved; /* options were saved for starting diff mode */ ! #define w_p_diff_saved w_onebuf_opt.wo_diff_saved int wo_scb_save; /* 'scrollbind' saved for diff mode*/ ! #define w_p_scb_save w_onebuf_opt.wo_scb_save int wo_wrap; #define w_p_wrap w_onebuf_opt.wo_wrap /* 'wrap' */ #ifdef FEAT_DIFF *************** *** 264,275 **** long wo_cole; /* 'conceallevel' */ # define w_p_cole w_onebuf_opt.wo_cole #endif - #ifdef FEAT_CURSORBIND int wo_crb; ! # define w_p_crb w_onebuf_opt.wo_crb /* 'cursorbind' */ int wo_crb_save; /* 'cursorbind' state saved for diff mode*/ ! # define w_p_crb_save w_onebuf_opt.wo_crb_save ! #endif #ifdef FEAT_SIGNS char_u *wo_scl; # define w_p_scl w_onebuf_opt.wo_scl /* 'signcolumn' */ --- 262,271 ---- long wo_cole; /* 'conceallevel' */ # define w_p_cole w_onebuf_opt.wo_cole #endif int wo_crb; ! #define w_p_crb w_onebuf_opt.wo_crb /* 'cursorbind' */ int wo_crb_save; /* 'cursorbind' state saved for diff mode*/ ! #define w_p_crb_save w_onebuf_opt.wo_crb_save #ifdef FEAT_SIGNS char_u *wo_scl; # define w_p_scl w_onebuf_opt.wo_scl /* 'signcolumn' */ *************** *** 2829,2837 **** /* transform a pointer to a "onebuf" option into a "allbuf" option */ #define GLOBAL_WO(p) ((char *)p + sizeof(winopt_T)) - #ifdef FEAT_SCROLLBIND long w_scbind_pos; - #endif #ifdef FEAT_EVAL dictitem_T w_winvar; /* variable for "w:" Dictionary */ --- 2825,2831 ---- *** ../vim-8.0.1565/src/version.c 2018-03-04 18:56:59.817710013 +0100 --- src/version.c 2018-03-04 20:09:42.497804711 +0100 *************** *** 776,777 **** --- 768,771 ---- { /* Add new patch number below this line */ + /**/ + 1566, /**/ -- THEOREM: VI is perfect. PROOF: VI in roman numerals is 6. The natural numbers < 6 which divide 6 are 1, 2, and 3. 1+2+3 = 6. So 6 is a perfect number. Therefore, VI is perfect. QED -- Arthur Tateishi /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///