]> granicus.if.org Git - vim/commitdiff
updated for version 7.2-078 v7.2.078
authorBram Moolenaar <Bram@vim.org>
Tue, 6 Jan 2009 14:02:45 +0000 (14:02 +0000)
committerBram Moolenaar <Bram@vim.org>
Tue, 6 Jan 2009 14:02:45 +0000 (14:02 +0000)
src/fold.c
src/version.c

index 1fe7c5a1d917eae55725ad2f379a71e3371de4ca..6567906be7d51209503022fed01e6279c26d3d19 100644 (file)
@@ -740,7 +740,7 @@ deleteFold(start, end, recursive, had_visual)
     garray_T   *found_ga;
     fold_T     *found_fp = NULL;
     linenr_T   found_off = 0;
-    int                use_level = FALSE;
+    int                use_level;
     int                maybe_small = FALSE;
     int                level = 0;
     linenr_T   lnum = start;
@@ -757,6 +757,7 @@ deleteFold(start, end, recursive, had_visual)
        gap = &curwin->w_folds;
        found_ga = NULL;
        lnum_off = 0;
+       use_level = FALSE;
        for (;;)
        {
            if (!foldFind(gap, lnum - lnum_off, &fp))
@@ -783,20 +784,21 @@ deleteFold(start, end, recursive, had_visual)
        else
        {
            lnum = found_fp->fd_top + found_fp->fd_len + found_off;
-           did_one = TRUE;
 
            if (foldmethodIsManual(curwin))
                deleteFoldEntry(found_ga,
                    (int)(found_fp - (fold_T *)found_ga->ga_data), recursive);
            else
            {
-               if (found_fp->fd_top + found_off < first_lnum)
-                   first_lnum = found_fp->fd_top;
-               if (lnum > last_lnum)
+               if (first_lnum > found_fp->fd_top + found_off)
+                   first_lnum = found_fp->fd_top + found_off;
+               if (last_lnum < lnum)
                    last_lnum = lnum;
-               parseMarker(curwin);
+               if (!did_one)
+                   parseMarker(curwin);
                deleteFoldMarkers(found_fp, recursive, found_off);
            }
+           did_one = TRUE;
 
            /* redraw window */
            changed_window_setting();
@@ -811,6 +813,10 @@ deleteFold(start, end, recursive, had_visual)
            redraw_curbuf_later(INVERTED);
 #endif
     }
+    else
+       /* Deleting markers may make cursor column invalid. */
+       check_cursor_col();
+
     if (last_lnum > 0)
        changed_lines(first_lnum, (colnr_T)0, last_lnum, 0L);
 }
index 5ad35f93deba6f40e48d56f3a02d395166db3a47..d6d660e0793be7744c8de79b1d0e8311dc8b4a14 100644 (file)
@@ -676,6 +676,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    78,
 /**/
     77,
 /**/