Skip to content

Commit 6c6ffd7

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents cbcc9df + 6e35a11 commit 6c6ffd7

49 files changed

Lines changed: 352 additions & 1301 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/buffer.c

Lines changed: 60 additions & 167 deletions
Large diffs are not rendered by default.

src/diff.c

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -872,13 +872,9 @@ diff_file(
872872
(diff_flags & DIFF_ICASE) ? "-i " : "",
873873
tmp_orig, tmp_new);
874874
append_redir(cmd, (int)len, p_srr, tmp_diff);
875-
#ifdef FEAT_AUTOCMD
876875
block_autocmds(); /* Avoid ShellCmdPost stuff */
877-
#endif
878876
(void)call_shell(cmd, SHELL_FILTER|SHELL_SILENT|SHELL_DOOUT);
879-
#ifdef FEAT_AUTOCMD
880877
unblock_autocmds();
881-
#endif
882878
vim_free(cmd);
883879
}
884880
}
@@ -984,13 +980,9 @@ ex_diffpatch(exarg_T *eap)
984980
* cooked mode to allow the user to respond to prompts. */
985981
vim_snprintf((char *)buf, buflen, "patch -o %s %s < %s",
986982
tmp_new, tmp_orig, esc_name);
987-
#ifdef FEAT_AUTOCMD
988983
block_autocmds(); /* Avoid ShellCmdPost stuff */
989-
#endif
990984
(void)call_shell(buf, SHELL_FILTER | SHELL_COOKED);
991-
#ifdef FEAT_AUTOCMD
992985
unblock_autocmds();
993-
#endif
994986
}
995987

996988
#ifdef UNIX
@@ -1052,11 +1044,9 @@ ex_diffpatch(exarg_T *eap)
10521044
eap->arg = newname;
10531045
ex_file(eap);
10541046

1055-
#ifdef FEAT_AUTOCMD
10561047
/* Do filetype detection with the new name. */
10571048
if (au_has_group((char_u *)"filetypedetect"))
10581049
do_cmdline_cmd((char_u *)":doau filetypedetect BufRead");
1059-
#endif
10601050
}
10611051
}
10621052
}
@@ -1170,16 +1160,12 @@ diff_win_options(
11701160
# endif
11711161

11721162
/* Use 'scrollbind' and 'cursorbind' when available */
1173-
#ifdef FEAT_SCROLLBIND
11741163
if (!wp->w_p_diff)
11751164
wp->w_p_scb_save = wp->w_p_scb;
11761165
wp->w_p_scb = TRUE;
1177-
#endif
1178-
#ifdef FEAT_CURSORBIND
11791166
if (!wp->w_p_diff)
11801167
wp->w_p_crb_save = wp->w_p_crb;
11811168
wp->w_p_crb = TRUE;
1182-
#endif
11831169
if (!wp->w_p_diff)
11841170
wp->w_p_wrap_save = wp->w_p_wrap;
11851171
wp->w_p_wrap = FALSE;
@@ -1209,10 +1195,8 @@ diff_win_options(
12091195
/* make sure topline is not halfway a fold */
12101196
changed_window_setting_win(wp);
12111197
# endif
1212-
#ifdef FEAT_SCROLLBIND
12131198
if (vim_strchr(p_sbo, 'h') == NULL)
12141199
do_cmdline_cmd((char_u *)"set sbo+=hor");
1215-
#endif
12161200
/* Save the current values, to be restored in ex_diffoff(). */
12171201
wp->w_p_diff_saved = TRUE;
12181202

@@ -1231,9 +1215,7 @@ diff_win_options(
12311215
ex_diffoff(exarg_T *eap)
12321216
{
12331217
win_T *wp;
1234-
#ifdef FEAT_SCROLLBIND
12351218
int diffwin = FALSE;
1236-
#endif
12371219

12381220
FOR_ALL_WINDOWS(wp)
12391221
{
@@ -1247,14 +1229,10 @@ ex_diffoff(exarg_T *eap)
12471229
if (wp->w_p_diff_saved)
12481230
{
12491231

1250-
#ifdef FEAT_SCROLLBIND
12511232
if (wp->w_p_scb)
12521233
wp->w_p_scb = wp->w_p_scb_save;
1253-
#endif
1254-
#ifdef FEAT_CURSORBIND
12551234
if (wp->w_p_crb)
12561235
wp->w_p_crb = wp->w_p_crb_save;
1257-
#endif
12581236
if (!wp->w_p_wrap)
12591237
wp->w_p_wrap = wp->w_p_wrap_save;
12601238
#ifdef FEAT_FOLDING
@@ -1286,20 +1264,16 @@ ex_diffoff(exarg_T *eap)
12861264
/* Note: 'sbo' is not restored, it's a global option. */
12871265
diff_buf_adjust(wp);
12881266
}
1289-
#ifdef FEAT_SCROLLBIND
12901267
diffwin |= wp->w_p_diff;
1291-
#endif
12921268
}
12931269

12941270
/* Also remove hidden buffers from the list. */
12951271
if (eap->forceit)
12961272
diff_buf_clear();
12971273

1298-
#ifdef FEAT_SCROLLBIND
12991274
/* Remove "hor" from from 'scrollopt' if there are no diff windows left. */
13001275
if (!diffwin && vim_strchr(p_sbo, 'h') != NULL)
13011276
do_cmdline_cmd((char_u *)"set sbo-=hor");
1302-
#endif
13031277
}
13041278

13051279
/*

0 commit comments

Comments
 (0)