From 63a39015f5510e1b0be094ae9298f31bf339cc0f Mon Sep 17 00:00:00 2001 From: Nicolas Cornu Date: Tue, 8 Sep 2015 02:34:43 +0200 Subject: hasFoldingWin now return bool --- src/nvim/fold.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/nvim/fold.c') diff --git a/src/nvim/fold.c b/src/nvim/fold.c index ab557ecf68..784faa35a3 100644 --- a/src/nvim/fold.c +++ b/src/nvim/fold.c @@ -150,12 +150,11 @@ int hasAnyFolding(win_T *win) */ int hasFolding(linenr_T lnum, linenr_T *firstp, linenr_T *lastp) { - return hasFoldingWin(curwin, lnum, firstp, lastp, TRUE, NULL); + return hasFoldingWin(curwin, lnum, firstp, lastp, TRUE, NULL) ? TRUE : FALSE; } /* hasFoldingWin() {{{2 */ -int -hasFoldingWin ( +bool hasFoldingWin( win_T *win, linenr_T lnum, linenr_T *firstp, @@ -183,7 +182,7 @@ hasFoldingWin ( if (!hasAnyFolding(win)) { if (infop != NULL) infop->fi_level = 0; - return FALSE; + return false; } if (cache) { @@ -238,7 +237,7 @@ hasFoldingWin ( infop->fi_lnum = lnum - lnum_rel; infop->fi_low_level = low_level == 0 ? level : low_level; } - return FALSE; + return false; } if (last > win->w_buffer->b_ml.ml_line_count) { @@ -253,7 +252,7 @@ hasFoldingWin ( infop->fi_lnum = first; infop->fi_low_level = low_level == 0 ? level + 1 : low_level; } - return TRUE; + return true; } /* foldLevel() {{{2 */ -- cgit From 16e9c853dfdea32fcf187fda147cafebd3dfc5dd Mon Sep 17 00:00:00 2001 From: Nicolas Cornu Date: Mon, 7 Sep 2015 15:16:35 +0200 Subject: hasFolding return bool now --- src/nvim/fold.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/fold.c') diff --git a/src/nvim/fold.c b/src/nvim/fold.c index 784faa35a3..b52938075c 100644 --- a/src/nvim/fold.c +++ b/src/nvim/fold.c @@ -148,9 +148,9 @@ int hasAnyFolding(win_T *win) * When returning TRUE, *firstp and *lastp are set to the first and last * 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 */ -- cgit