Mercurial > vim
diff src/gui.c @ 13384:6740c499de13 v8.0.1566
patch 8.0.1566: too many #ifdefs
commit https://github.com/vim/vim/commit/8a3bb56230d220b8e1b4dcca517ed95f5341b8c7
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Mar 4 20:14:14 2018 +0100
patch 8.0.1566: too many #ifdefs
Problem: Too many #ifdefs.
Solution: Graduate FEAT_SCROLLBIND and FEAT_CURSORBIND.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 04 Mar 2018 20:15:05 +0100 |
parents | 69517d67421f |
children | bf3de2fd98fa |
line wrap: on
line diff
--- a/src/gui.c +++ b/src/gui.c @@ -3959,9 +3959,7 @@ gui_drag_scrollbar(scrollbar_T *sb, long 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 } #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 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. */