diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-03-04 20:14:14 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-03-04 20:14:14 +0100 |
commit | 8a3bb56230d220b8e1b4dcca517ed95f5341b8c7 (patch) | |
tree | e1d195050f92f44fc1993ca016c07611cb6faaa7 /src/diff.c | |
parent | 107279c17b3a21899e0a9d0293ada040216539ba (diff) | |
download | vim-git-8a3bb56230d220b8e1b4dcca517ed95f5341b8c7.tar.gz |
patch 8.0.1566: too many #ifdefsv8.0.1566
Problem: Too many #ifdefs.
Solution: Graduate FEAT_SCROLLBIND and FEAT_CURSORBIND.
Diffstat (limited to 'src/diff.c')
-rw-r--r-- | src/diff.c | 16 |
1 files changed, 0 insertions, 16 deletions
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 } /* |