File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -1235,10 +1235,19 @@ ex_diffoff(eap)
12351235 curbuf = curwin -> w_buffer ;
12361236 if (wp -> w_p_fdc == diff_foldcolumn )
12371237 wp -> w_p_fdc = wp -> w_p_diff_saved ? wp -> w_p_fdc_save : 0 ;
1238- if (wp -> w_p_fen )
1239- wp -> w_p_fen = wp -> w_p_diff_saved ? wp -> w_p_fen_save : FALSE;
12401238 if (wp -> w_p_fdl == 0 && wp -> w_p_diff_saved )
12411239 wp -> w_p_fdl = wp -> w_p_fdl_save ;
1240+
1241+ if (wp -> w_p_fen )
1242+ {
1243+ /* Only restore 'foldenable' when 'foldmethod' is not
1244+ * "manual", otherwise we continue to show the diff folds. */
1245+ if (foldmethodIsManual (wp ) || !wp -> w_p_diff_saved )
1246+ wp -> w_p_fen = FALSE;
1247+ else
1248+ wp -> w_p_fen = wp -> w_p_fen_save ;
1249+ }
1250+
12421251 foldUpdateAll (wp );
12431252 /* make sure topline is not halfway a fold */
12441253 changed_window_setting_win (wp );
Original file line number Diff line number Diff line change @@ -727,6 +727,8 @@ static char *(features[]) =
727727
728728static int included_patches [] =
729729{ /* Add new patch number below this line */
730+ /**/
731+ 26 ,
730732/**/
731733 25 ,
732734/**/
You can’t perform that action at this time.
0 commit comments