hasFolding return bool now

This commit is contained in:
Nicolas Cornu 2015-09-07 15:16:35 +02:00
parent 63a39015f5
commit 16e9c853df
3 changed files with 5 additions and 5 deletions

View File

@ -148,9 +148,9 @@ int hasAnyFolding(win_T *win)
* When returning TRUE, *firstp and *lastp are set to the first and last * When returning TRUE, *firstp and *lastp are set to the first and last
* lnum of the sequence of folded lines (skipped when NULL). * lnum of the sequence of folded lines (skipped when NULL).
*/ */
int hasFolding(linenr_T lnum, linenr_T *firstp, linenr_T *lastp) bool hasFolding(linenr_T lnum, linenr_T *firstp, linenr_T *lastp)
{ {
return hasFoldingWin(curwin, lnum, firstp, lastp, TRUE, NULL) ? TRUE : FALSE; return hasFoldingWin(curwin, lnum, firstp, lastp, TRUE, NULL);
} }
/* hasFoldingWin() {{{2 */ /* hasFoldingWin() {{{2 */

View File

@ -232,7 +232,7 @@ retnomove:
if (!first && count > -row) if (!first && count > -row)
break; break;
first = false; first = false;
hasFolding(curwin->w_topline, &curwin->w_topline, NULL); (void)hasFolding(curwin->w_topline, &curwin->w_topline, NULL);
if (curwin->w_topfill < diff_check(curwin, curwin->w_topline)) { if (curwin->w_topfill < diff_check(curwin, curwin->w_topline)) {
++curwin->w_topfill; ++curwin->w_topfill;
} else { } else {

View File

@ -648,7 +648,7 @@ static void validate_cheight(void)
+ curwin->w_topfill; + curwin->w_topfill;
else else
curwin->w_cline_height = plines(curwin->w_cursor.lnum); curwin->w_cline_height = plines(curwin->w_cursor.lnum);
curwin->w_cline_folded = hasFolding(curwin->w_cursor.lnum, NULL, NULL) == TRUE; curwin->w_cline_folded = hasFolding(curwin->w_cursor.lnum, NULL, NULL);
curwin->w_valid |= VALID_CHEIGHT; curwin->w_valid |= VALID_CHEIGHT;
} }
} }
@ -1177,7 +1177,7 @@ void scrolldown_clamp(void)
--curwin->w_topline; --curwin->w_topline;
curwin->w_topfill = 0; curwin->w_topfill = 0;
} }
hasFolding(curwin->w_topline, &curwin->w_topline, NULL); (void)hasFolding(curwin->w_topline, &curwin->w_topline, NULL);
--curwin->w_botline; /* approximate w_botline */ --curwin->w_botline; /* approximate w_botline */
curwin->w_valid &= ~(VALID_WROW|VALID_CROW|VALID_BOTLINE); curwin->w_valid &= ~(VALID_WROW|VALID_CROW|VALID_BOTLINE);
} }