mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
fold: finish in foldUpdateIEMSRecurse() is bool
This commit is contained in:
parent
3f8ba68895
commit
667b8cd108
@ -2140,7 +2140,7 @@ static linenr_T foldUpdateIEMSRecurse(garray_T *gap, int level,
|
|||||||
linenr_T startlnum2 = startlnum;
|
linenr_T startlnum2 = startlnum;
|
||||||
linenr_T firstlnum = flp->lnum; /* first lnum we got */
|
linenr_T firstlnum = flp->lnum; /* first lnum we got */
|
||||||
int i;
|
int i;
|
||||||
int finish = FALSE;
|
bool finish = false;
|
||||||
linenr_T linecount = flp->wp->w_buffer->b_ml.ml_line_count - flp->off;
|
linenr_T linecount = flp->wp->w_buffer->b_ml.ml_line_count - flp->off;
|
||||||
int concat;
|
int concat;
|
||||||
|
|
||||||
@ -2309,8 +2309,9 @@ static linenr_T foldUpdateIEMSRecurse(garray_T *gap, int level,
|
|||||||
* found. */
|
* found. */
|
||||||
if (getlevel == foldlevelMarker
|
if (getlevel == foldlevelMarker
|
||||||
|| getlevel == foldlevelExpr
|
|| getlevel == foldlevelExpr
|
||||||
|| getlevel == foldlevelSyntax)
|
|| getlevel == foldlevelSyntax) {
|
||||||
finish = TRUE;
|
finish = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (fp->fd_top == startlnum && concat) {
|
if (fp->fd_top == startlnum && concat) {
|
||||||
i = (int)(fp - (fold_T *)gap->ga_data);
|
i = (int)(fp - (fold_T *)gap->ga_data);
|
||||||
@ -2367,7 +2368,7 @@ static linenr_T foldUpdateIEMSRecurse(garray_T *gap, int level,
|
|||||||
if (getlevel == foldlevelMarker
|
if (getlevel == foldlevelMarker
|
||||||
|| getlevel == foldlevelExpr
|
|| getlevel == foldlevelExpr
|
||||||
|| getlevel == foldlevelSyntax) {
|
|| getlevel == foldlevelSyntax) {
|
||||||
finish = TRUE;
|
finish = true;
|
||||||
}
|
}
|
||||||
fold_changed = TRUE;
|
fold_changed = TRUE;
|
||||||
break;
|
break;
|
||||||
@ -2388,12 +2389,11 @@ static linenr_T foldUpdateIEMSRecurse(garray_T *gap, int level,
|
|||||||
* Check "fp" for safety.
|
* Check "fp" for safety.
|
||||||
*/
|
*/
|
||||||
if (lvl > level && fp != NULL) {
|
if (lvl > level && fp != NULL) {
|
||||||
/*
|
// There is a nested fold, handle it recursively.
|
||||||
* There is a nested fold, handle it recursively.
|
// At least do one line (can happen when finish is true).
|
||||||
*/
|
if (bot < flp->lnum) {
|
||||||
/* At least do one line (can happen when finish is TRUE). */
|
|
||||||
if (bot < flp->lnum)
|
|
||||||
bot = flp->lnum;
|
bot = flp->lnum;
|
||||||
|
}
|
||||||
|
|
||||||
/* Line numbers in the nested fold are relative to the start of
|
/* Line numbers in the nested fold are relative to the start of
|
||||||
* this fold. */
|
* this fold. */
|
||||||
|
Loading…
Reference in New Issue
Block a user