Skip to content

Commit fe70c51

Browse files
committed
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)
1 parent 42f45b8 commit fe70c51

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

src/ex_cmds.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -799,16 +799,8 @@ do_move(linenr_T line1, linenr_T line2, linenr_T dest)
799799
linenr_T num_lines; /* Num lines moved */
800800
linenr_T last_line; /* Last line in file after adding new text */
801801
#ifdef FEAT_FOLDING
802-
int isFolded;
803802
win_T *win;
804803
tabpage_T *tp;
805-
806-
/* Moving lines seems to corrupt the folds, delete folding info now
807-
* and recreate it when finished. Don't do this for manual folding, it
808-
* would delete all folds. */
809-
isFolded = hasAnyFolding(curwin) && !foldmethodIsManual(curwin);
810-
if (isFolded)
811-
deleteFoldRecurse(&curwin->w_folds);
812804
#endif
813805

814806
if (dest >= line1 && dest < line2)
@@ -918,12 +910,6 @@ do_move(linenr_T line1, linenr_T line2, linenr_T dest)
918910
else
919911
changed_lines(dest + 1, 0, line1 + num_lines, 0L);
920912

921-
#ifdef FEAT_FOLDING
922-
/* recreate folds */
923-
if (isFolded)
924-
foldUpdateAll(curwin);
925-
#endif
926-
927913
return OK;
928914
}
929915

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
459,
767769
/**/
768770
458,
769771
/**/

0 commit comments

Comments
 (0)