mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.0.1566: too many #ifdefs
Problem: Too many #ifdefs. Solution: Graduate FEAT_SCROLLBIND and FEAT_CURSORBIND.
This commit is contained in:
10
src/gui.c
10
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. */
|
||||
|
Reference in New Issue
Block a user