patch 8.0.1566: too many #ifdefs
Problem: Too many #ifdefs.
Solution: Graduate FEAT_SCROLLBIND and FEAT_CURSORBIND.
diff --git a/src/gui.c b/src/gui.c
index 607a8fd..eac4fae 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -3959,9 +3959,7 @@
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 @@
}
#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 @@
updateWindow(wp);
setcursor();
}
-# endif
out_flush_cursor(FALSE, TRUE);
#else
add_to_input_buf(bytes, byte_count);
@@ -4474,9 +4470,7 @@
}
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. */