0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

updated for version 7.4a.026

Problem:    ":diffoff" does not remove folds. (Ramel)
Solution:   Do not restore 'foldenable' when 'foldmethod' is "manual".
This commit is contained in:
Bram Moolenaar
2013-07-17 13:43:39 +02:00
parent 56667a5d3e
commit 33ca6bf240
2 changed files with 13 additions and 2 deletions

View File

@@ -1235,10 +1235,19 @@ ex_diffoff(eap)
curbuf = curwin->w_buffer; curbuf = curwin->w_buffer;
if (wp->w_p_fdc == diff_foldcolumn) if (wp->w_p_fdc == diff_foldcolumn)
wp->w_p_fdc = wp->w_p_diff_saved ? wp->w_p_fdc_save : 0; wp->w_p_fdc = wp->w_p_diff_saved ? wp->w_p_fdc_save : 0;
if (wp->w_p_fen)
wp->w_p_fen = wp->w_p_diff_saved ? wp->w_p_fen_save : FALSE;
if (wp->w_p_fdl == 0 && wp->w_p_diff_saved) if (wp->w_p_fdl == 0 && wp->w_p_diff_saved)
wp->w_p_fdl = wp->w_p_fdl_save; wp->w_p_fdl = wp->w_p_fdl_save;
if (wp->w_p_fen)
{
/* Only restore 'foldenable' when 'foldmethod' is not
* "manual", otherwise we continue to show the diff folds. */
if (foldmethodIsManual(wp) || !wp->w_p_diff_saved)
wp->w_p_fen = FALSE;
else
wp->w_p_fen = wp->w_p_fen_save;
}
foldUpdateAll(wp); foldUpdateAll(wp);
/* make sure topline is not halfway a fold */ /* make sure topline is not halfway a fold */
changed_window_setting_win(wp); changed_window_setting_win(wp);

View File

@@ -727,6 +727,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
26,
/**/ /**/
25, 25,
/**/ /**/