mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
updated for version 7.2-078
This commit is contained in:
18
src/fold.c
18
src/fold.c
@@ -740,7 +740,7 @@ deleteFold(start, end, recursive, had_visual)
|
|||||||
garray_T *found_ga;
|
garray_T *found_ga;
|
||||||
fold_T *found_fp = NULL;
|
fold_T *found_fp = NULL;
|
||||||
linenr_T found_off = 0;
|
linenr_T found_off = 0;
|
||||||
int use_level = FALSE;
|
int use_level;
|
||||||
int maybe_small = FALSE;
|
int maybe_small = FALSE;
|
||||||
int level = 0;
|
int level = 0;
|
||||||
linenr_T lnum = start;
|
linenr_T lnum = start;
|
||||||
@@ -757,6 +757,7 @@ deleteFold(start, end, recursive, had_visual)
|
|||||||
gap = &curwin->w_folds;
|
gap = &curwin->w_folds;
|
||||||
found_ga = NULL;
|
found_ga = NULL;
|
||||||
lnum_off = 0;
|
lnum_off = 0;
|
||||||
|
use_level = FALSE;
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
if (!foldFind(gap, lnum - lnum_off, &fp))
|
if (!foldFind(gap, lnum - lnum_off, &fp))
|
||||||
@@ -783,20 +784,21 @@ deleteFold(start, end, recursive, had_visual)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
lnum = found_fp->fd_top + found_fp->fd_len + found_off;
|
lnum = found_fp->fd_top + found_fp->fd_len + found_off;
|
||||||
did_one = TRUE;
|
|
||||||
|
|
||||||
if (foldmethodIsManual(curwin))
|
if (foldmethodIsManual(curwin))
|
||||||
deleteFoldEntry(found_ga,
|
deleteFoldEntry(found_ga,
|
||||||
(int)(found_fp - (fold_T *)found_ga->ga_data), recursive);
|
(int)(found_fp - (fold_T *)found_ga->ga_data), recursive);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (found_fp->fd_top + found_off < first_lnum)
|
if (first_lnum > found_fp->fd_top + found_off)
|
||||||
first_lnum = found_fp->fd_top;
|
first_lnum = found_fp->fd_top + found_off;
|
||||||
if (lnum > last_lnum)
|
if (last_lnum < lnum)
|
||||||
last_lnum = lnum;
|
last_lnum = lnum;
|
||||||
parseMarker(curwin);
|
if (!did_one)
|
||||||
|
parseMarker(curwin);
|
||||||
deleteFoldMarkers(found_fp, recursive, found_off);
|
deleteFoldMarkers(found_fp, recursive, found_off);
|
||||||
}
|
}
|
||||||
|
did_one = TRUE;
|
||||||
|
|
||||||
/* redraw window */
|
/* redraw window */
|
||||||
changed_window_setting();
|
changed_window_setting();
|
||||||
@@ -811,6 +813,10 @@ deleteFold(start, end, recursive, had_visual)
|
|||||||
redraw_curbuf_later(INVERTED);
|
redraw_curbuf_later(INVERTED);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
/* Deleting markers may make cursor column invalid. */
|
||||||
|
check_cursor_col();
|
||||||
|
|
||||||
if (last_lnum > 0)
|
if (last_lnum > 0)
|
||||||
changed_lines(first_lnum, (colnr_T)0, last_lnum, 0L);
|
changed_lines(first_lnum, (colnr_T)0, last_lnum, 0L);
|
||||||
}
|
}
|
||||||
|
@@ -676,6 +676,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
78,
|
||||||
/**/
|
/**/
|
||||||
77,
|
77,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user