changeset 11144:e85aa0e46ca5 v8.0.0459

patch 8.0.0459: old fix for :move and folding no longer needed commit https://github.com/vim/vim/commit/fe70c5198336dba7e8b0fa915e6c4350e7f80f6f Author: Bram Moolenaar <Bram@vim.org> Date: Wed Mar 15 20:45:53 2017 +0100 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)
author Christian Brabandt <cb@256bit.org>
date Wed, 15 Mar 2017 21:00:04 +0100
parents ed0f1fee66f1
children e84f9f9b5d49
files src/ex_cmds.c src/version.c
diffstat 2 files changed, 2 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -799,16 +799,8 @@ do_move(linenr_T line1, linenr_T line2, 
     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, 
     else
 	changed_lines(dest + 1, 0, line1 + num_lines, 0L);
 
-#ifdef FEAT_FOLDING
-    /* recreate folds */
-    if (isFolded)
-	foldUpdateAll(curwin);
-#endif
-
     return OK;
 }
 
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    459,
+/**/
     458,
 /**/
     457,