diff options
author | Bram Moolenaar <Bram@vim.org> | 2009-01-06 14:02:45 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2009-01-06 14:02:45 +0000 |
commit | 238b8e20bb3c659a7350ab4dbf04d05a56ab2d13 (patch) | |
tree | f92fb3b45d60c4ed8c694967a17c6e6ac30f332f /src/fold.c | |
parent | e0e6f9921283cb3489943c2559753fe24d1c0603 (diff) | |
download | vim-git-238b8e20bb3c659a7350ab4dbf04d05a56ab2d13.tar.gz |
updated for version 7.2-078v7.2.078
Diffstat (limited to 'src/fold.c')
-rw-r--r-- | src/fold.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/fold.c b/src/fold.c index 1fe7c5a1d..6567906be 100644 --- a/src/fold.c +++ b/src/fold.c @@ -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); } |