summaryrefslogtreecommitdiffstats
path: root/src/gui.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-03-04 20:14:14 +0100
committerBram Moolenaar <Bram@vim.org>2018-03-04 20:14:14 +0100
commit8a3bb56230d220b8e1b4dcca517ed95f5341b8c7 (patch)
treee1d195050f92f44fc1993ca016c07611cb6faaa7 /src/gui.c
parent107279c17b3a21899e0a9d0293ada040216539ba (diff)
patch 8.0.1566: too many #ifdefsv8.0.1566
Problem: Too many #ifdefs. Solution: Graduate FEAT_SCROLLBIND and FEAT_CURSORBIND.
Diffstat (limited to 'src/gui.c')
-rw-r--r--src/gui.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/gui.c b/src/gui.c
index 607a8fd2a5..eac4fae685 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. */