mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.0.0459: old fix for :move and folding no longer needed
Problem: Old fix for :move messing up folding no longer needed, now that we have a proper solution. Solution: Revert patch 7.4.700. (Christian Brabandt)
This commit is contained in:
parent
42f45b850d
commit
fe70c51983
@ -799,16 +799,8 @@ do_move(linenr_T line1, linenr_T line2, linenr_T dest)
|
|||||||
linenr_T num_lines; /* Num lines moved */
|
linenr_T num_lines; /* Num lines moved */
|
||||||
linenr_T last_line; /* Last line in file after adding new text */
|
linenr_T last_line; /* Last line in file after adding new text */
|
||||||
#ifdef FEAT_FOLDING
|
#ifdef FEAT_FOLDING
|
||||||
int isFolded;
|
|
||||||
win_T *win;
|
win_T *win;
|
||||||
tabpage_T *tp;
|
tabpage_T *tp;
|
||||||
|
|
||||||
/* Moving lines seems to corrupt the folds, delete folding info now
|
|
||||||
* and recreate it when finished. Don't do this for manual folding, it
|
|
||||||
* would delete all folds. */
|
|
||||||
isFolded = hasAnyFolding(curwin) && !foldmethodIsManual(curwin);
|
|
||||||
if (isFolded)
|
|
||||||
deleteFoldRecurse(&curwin->w_folds);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (dest >= line1 && dest < line2)
|
if (dest >= line1 && dest < line2)
|
||||||
@ -918,12 +910,6 @@ do_move(linenr_T line1, linenr_T line2, linenr_T dest)
|
|||||||
else
|
else
|
||||||
changed_lines(dest + 1, 0, line1 + num_lines, 0L);
|
changed_lines(dest + 1, 0, line1 + num_lines, 0L);
|
||||||
|
|
||||||
#ifdef FEAT_FOLDING
|
|
||||||
/* recreate folds */
|
|
||||||
if (isFolded)
|
|
||||||
foldUpdateAll(curwin);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -764,6 +764,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 */
|
||||||
|
/**/
|
||||||
|
459,
|
||||||
/**/
|
/**/
|
||||||
458,
|
458,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user