summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/buffer.c3
-rw-r--r--src/diff.c16
-rw-r--r--src/edit.c4
-rw-r--r--src/evalfunc.c4
-rw-r--r--src/ex_cmds.c4
-rw-r--r--src/ex_cmds2.c3
-rw-r--r--src/ex_docmd.c8
-rw-r--r--src/globals.h2
-rw-r--r--src/gui.c10
-rw-r--r--src/macros.h14
-rw-r--r--src/main.c4
-rw-r--r--src/move.c6
-rw-r--r--src/normal.c6
-rw-r--r--src/option.c35
-rw-r--r--src/option.h6
-rw-r--r--src/structs.h16
-rw-r--r--src/term.c2
-rw-r--r--src/version.c10
-rw-r--r--src/window.c8
19 files changed, 19 insertions, 142 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 328557741..b292150a2 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1583,8 +1583,7 @@ do_buffer(
/* Go to the other buffer. */
set_curbuf(buf, action);
-#if defined(FEAT_LISTCMDS) \
- && (defined(FEAT_SCROLLBIND) || defined(FEAT_CURSORBIND))
+#if defined(FEAT_LISTCMDS)
if (action == DOBUF_SPLIT)
{
RESET_BINDING(curwin); /* reset 'scrollbind' and 'cursorbind' */
diff --git a/src/diff.c b/src/diff.c
index 6f3c99b9a..b69b69e31 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -1160,16 +1160,12 @@ diff_win_options(
# 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;
@@ -1199,10 +1195,8 @@ diff_win_options(
/* 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;
@@ -1221,9 +1215,7 @@ diff_win_options(
ex_diffoff(exarg_T *eap)
{
win_T *wp;
-#ifdef FEAT_SCROLLBIND
int diffwin = FALSE;
-#endif
FOR_ALL_WINDOWS(wp)
{
@@ -1237,14 +1229,10 @@ ex_diffoff(exarg_T *eap)
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
@@ -1276,20 +1264,16 @@ ex_diffoff(exarg_T *eap)
/* 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
}
/*
diff --git a/src/edit.c b/src/edit.c
index e20857df6..423ccea44 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -764,15 +764,11 @@ edit(
*/
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
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 48eac5737..9cbdf3f0b 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -5852,9 +5852,7 @@ f_has(typval_T *argvars, typval_T *rettv)
#ifdef FEAT_CSCOPE
"cscope",
#endif
-#ifdef FEAT_CURSORBIND
"cursorbind",
-#endif
#ifdef CURSOR_SHAPE
"cursorshape",
#endif
@@ -6104,9 +6102,7 @@ f_has(typval_T *argvars, typval_T *rettv)
#if defined(FEAT_RUBY) && !defined(DYNAMIC_RUBY)
"ruby",
#endif
-#ifdef FEAT_SCROLLBIND
"scrollbind",
-#endif
#ifdef FEAT_CMDL_INFO
"showcmd",
"cmdline_info",
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 23930ca2a..6845be57d 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -4318,9 +4318,7 @@ do_ecmd(
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 */
}
@@ -5270,10 +5268,8 @@ do_sub(exarg_T *eap)
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. */
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index b1f80f9b9..424bac8c7 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -3232,11 +3232,10 @@ ex_listdo(exarg_T *eap)
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)
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index c0eed2d5f..0a51d8eb7 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -8263,20 +8263,18 @@ ex_splitview(exarg_T *eap)
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
+# ifdef FEAT_BROWSE
|| cmdmod.browse
-# endif
+# endif
)
{
RESET_BINDING(curwin);
}
else
do_check_scrollbind(FALSE);
-# endif
do_exedit(eap, old_curwin);
}
@@ -8768,7 +8766,6 @@ ex_swapname(exarg_T *eap UNUSED)
static void
ex_syncbind(exarg_T *eap UNUSED)
{
-#ifdef FEAT_SCROLLBIND
win_T *wp;
win_T *save_curwin = curwin;
buf_T *save_curbuf = curbuf;
@@ -8836,7 +8833,6 @@ ex_syncbind(exarg_T *eap UNUSED)
ins_typebuf(ctrl_o, REMAP_NONE, 0, TRUE, FALSE);
}
}
-#endif
}
diff --git a/src/globals.h b/src/globals.h
index c62e96a2c..d5320d727 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -728,7 +728,6 @@ EXTERN colnr_T ai_col INIT(= 0);
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
@@ -736,7 +735,6 @@ EXTERN int end_comment_pending INIT(= NUL);
* undo some of the work done by ":syncbind.") -ralston
*/
EXTERN int did_syncbind INIT(= FALSE);
-#endif
#ifdef FEAT_SMARTINDENT
/*
diff --git a/src/gui.c b/src/gui.c
index 607a8fd2a..eac4fae68 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -3959,9 +3959,7 @@ gui_drag_scrollbar(scrollbar_T *sb, long value, int still_dragging)
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
@@ -4126,16 +4124,15 @@ gui_drag_scrollbar(scrollbar_T *sb, long value, int still_dragging)
}
#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
+# ifdef FEAT_DIFF
|| curwin->w_topfill != old_topfill
-# endif
+# endif
))))
{
do_check_scrollbind(TRUE);
@@ -4145,7 +4142,6 @@ gui_drag_scrollbar(scrollbar_T *sb, long value, int still_dragging)
updateWindow(wp);
setcursor();
}
-# endif
out_flush_cursor(FALSE, TRUE);
#else
add_to_input_buf(bytes, byte_count);
@@ -4474,9 +4470,7 @@ gui_do_scroll(void)
}
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. */
diff --git a/src/macros.h b/src/macros.h
index 43d6c94cf..f5440b17e 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -294,19 +294,7 @@
# 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
+#define RESET_BINDING(wp) (wp)->w_p_scb = FALSE; (wp)->w_p_crb = FALSE
#ifdef FEAT_DIFF
# define PLINES_NOFILL(x) plines_nofill(x)
diff --git a/src/main.c b/src/main.c
index 406635a16..ff01fd968 100644
--- a/src/main.c
+++ b/src/main.c
@@ -857,7 +857,7 @@ vim_main2(void)
}
#endif
-#if defined(FEAT_DIFF) && defined(FEAT_SCROLLBIND)
+#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,7 +1193,7 @@ main_loop(
curbuf->b_last_changedtick = CHANGEDTICK(curbuf);
}
-#if defined(FEAT_DIFF) && defined(FEAT_SCROLLBIND)
+#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)
diff --git a/src/move.c b/src/move.c
index 45f7be4ed..a56003013 100644
--- a/src/move.c
+++ b/src/move.c
@@ -184,9 +184,7 @@ update_topline(void)
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;
}
@@ -215,9 +213,7 @@ update_topline(void)
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
}
/*
@@ -2773,7 +2769,6 @@ halfpage(int flag, linenr_T Prenum)
redraw_later(VALID);
}
-#if defined(FEAT_CURSORBIND) || defined(PROTO)
void
do_check_cursorbind(void)
{
@@ -2846,4 +2841,3 @@ do_check_cursorbind(void)
curwin = old_curwin;
curbuf = old_curbuf;
}
-#endif /* FEAT_CURSORBIND */
diff --git a/src/normal.c b/src/normal.c
index 5aa7fe049..89b2dc02a 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -1275,21 +1275,17 @@ normal_end:
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 */
@@ -3980,7 +3976,6 @@ display_showcmd(void)
}
#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
@@ -4139,7 +4134,6 @@ check_scrollbind(linenr_T topline_diff, long leftcol_diff)
curwin = old_curwin;
curbuf = old_curbuf;
}
-#endif /* #ifdef FEAT_SCROLLBIND */
/*
* Command character that's ignored.
diff --git a/src/option.c b/src/option.c
index 6fb24c536..a2142aaf4 100644
--- a/src/option.c
+++ b/src/option.c
@@ -227,9 +227,7 @@
# 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_SCBIND OPT_WIN(WV_SCBIND)
#define PV_SCROLL OPT_WIN(WV_SCROLL)
#ifdef FEAT_SPELL
# define PV_SPELL OPT_WIN(WV_SPELL)
@@ -246,9 +244,7 @@
# 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
+#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,11 +972,7 @@ static struct vimoption options[] =
#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
@@ -2382,11 +2374,7 @@ static struct vimoption options[] =
(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,
@@ -2395,13 +2383,8 @@ static struct vimoption options[] =
(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,
@@ -3230,9 +3213,7 @@ static char *(p_km_values[]) = {"startsel", "stopsel", NULL};
#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};
@@ -6240,13 +6221,11 @@ did_set_string_option(
#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
@@ -8328,7 +8307,6 @@ set_bool_option(
}
#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)
@@ -8339,7 +8317,6 @@ set_bool_option(
curwin->w_scbind_pos = curwin->w_topline;
}
}
-#endif
#if defined(FEAT_QUICKFIX)
/* There can be only one window with 'previewwindow' set. */
@@ -10688,12 +10665,8 @@ get_varp(struct vimoption *p)
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);
@@ -10878,14 +10851,10 @@ copy_winopt(winopt_T *from, winopt_T *to)
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
diff --git a/src/option.h b/src/option.h
index a338ba672..d408a2d07 100644
--- a/src/option.h
+++ b/src/option.h
@@ -739,9 +739,7 @@ EXTERN char_u *p_pp; /* 'packpath' */
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' */
@@ -1133,9 +1131,7 @@ enum
, WV_TK
, WV_TMS
#endif
-#ifdef FEAT_CURSORBIND
, WV_CRBIND
-#endif
#ifdef FEAT_LINEBREAK
, WV_BRI
, WV_BRIOPT
@@ -1172,9 +1168,7 @@ enum
, WV_RL
, WV_RLC
#endif
-#ifdef FEAT_SCROLLBIND
, WV_SCBIND
-#endif
, WV_SCROLL
#ifdef FEAT_SPELL
, WV_SPELL
diff --git a/src/structs.h b/src/structs.h
index 56af7939d..6979dbc73 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -244,14 +244,12 @@ typedef struct
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' */
+#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
+#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
+#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,12 +262,10 @@ typedef struct
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' */
+#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
+#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,9 +2825,7 @@ struct window_S
/* 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 */
diff --git a/src/term.c b/src/term.c
index 72b68123b..b063d9189 100644
--- a/src/term.c
+++ b/src/term.c
@@ -3297,10 +3297,8 @@ set_shellsize(int width, int height, int mustset)
}
else
{
-#ifdef FEAT_SCROLLBIND
if (curwin->w_p_scb)
do_check_scrollbind(TRUE);
-#endif
if (State & CMDLINE)
{
update_screen(NOT_VALID);
diff --git a/src/version.c b/src/version.c
index 01b812c17..b00217dcd 100644
--- a/src/version.c
+++ b/src/version.c
@@ -168,11 +168,7 @@ static char *(features[]) =
#else
"-cscope",
#endif
-#ifdef FEAT_CURSORBIND
"+cursorbind",
-#else
- "-cursorbind",
-#endif
#ifdef CURSOR_SHAPE
"+cursorshape",
#else
@@ -556,11 +552,7 @@ static char *(features[]) =
#else
"-ruby",
#endif
-#ifdef FEAT_SCROLLBIND
"+scrollbind",
-#else
- "-scrollbind",
-#endif
#ifdef FEAT_SIGNS
"+signs",
#else
@@ -775,6 +767,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1566,
+/**/
1565,
/**/
1564,
diff --git a/src/window.c b/src/window.c
index 23c324b5b..337f84dee 100644
--- a/src/window.c
+++ b/src/window.c
@@ -4498,9 +4498,7 @@ win_alloc(win_T *after UNUSED, int hidden UNUSED)
#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;
@@ -5659,11 +5657,7 @@ scroll_to_fraction(win_T *wp, int prev_height)
/* 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
- )
+ if (height > 0 && (!wp->w_p_scb || wp == curwin))
{
/*
* Find a value for w_topline that shows the cursor at the same