patch 8.0.0459: old fix for :move and folding no longer needed v8.0.0459
authorBram Moolenaar <Bram@vim.org>
Wed, 15 Mar 2017 19:45:53 +0000 (20:45 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 15 Mar 2017 19:45:53 +0000 (20:45 +0100)
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)

src/ex_cmds.c
src/version.c

index 8977302740fc3fdee0f9194b2b8d9e3c590e7124..df35f52da8b83fdc1c70ae664eb317d872f2b03f 100644 (file)
@@ -799,16 +799,8 @@ do_move(linenr_T line1, linenr_T line2, linenr_T dest)
     linenr_T   num_lines;  /* Num lines moved */
     linenr_T   last_line;  /* Last line in file after adding new text */
 #ifdef FEAT_FOLDING
-    int                isFolded;
     win_T      *win;
     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
 
     if (dest >= line1 && dest < line2)
@@ -918,12 +910,6 @@ do_move(linenr_T line1, linenr_T line2, linenr_T dest)
     else
        changed_lines(dest + 1, 0, line1 + num_lines, 0L);
 
-#ifdef FEAT_FOLDING
-    /* recreate folds */
-    if (isFolded)
-       foldUpdateAll(curwin);
-#endif
-
     return OK;
 }
 
index 2e211984f6f7da611ccd2c28c81074a64bd205b6..b907c753165ed0bfc30217a9dc9184a76eb9d1a6 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    459,
 /**/
     458,
 /**/