aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Edmund Lazo <janedmundlazo@hotmail.com>2018-07-18 13:46:40 -0400
committerJan Edmund Lazo <janedmundlazo@hotmail.com>2018-08-01 15:28:50 -0400
commitc0dbd8df959e2c0dfc4bd6ffd596022f9e023a80 (patch)
treeb3a88625a35b4ba9454aae04fe136d805f9fea4d /src
parent44cb491f6e2dd0b1aafa9ab83fe5f13cfbb716df (diff)
downloadrneovim-c0dbd8df959e2c0dfc4bd6ffd596022f9e023a80.tar.gz
rneovim-c0dbd8df959e2c0dfc4bd6ffd596022f9e023a80.tar.bz2
rneovim-c0dbd8df959e2c0dfc4bd6ffd596022f9e023a80.zip
fold: use_level,maybe_small are bool
use_levelp, maybe_smallp in check_closed() are bool ptrs.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/fold.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/nvim/fold.c b/src/nvim/fold.c
index e2de6e7cc1..6cf29a56f0 100644
--- a/src/nvim/fold.c
+++ b/src/nvim/fold.c
@@ -167,8 +167,8 @@ bool hasFoldingWin(
int x;
fold_T *fp;
int level = 0;
- int use_level = FALSE;
- int maybe_small = FALSE;
+ bool use_level = false;
+ bool maybe_small = false;
garray_T *gap;
int low_level = 0;
@@ -673,8 +673,7 @@ deleteFold(
garray_T *found_ga;
fold_T *found_fp = NULL;
linenr_T found_off = 0;
- int use_level;
- int maybe_small = FALSE;
+ bool maybe_small = false;
int level = 0;
linenr_T lnum = start;
linenr_T lnum_off;
@@ -689,7 +688,7 @@ deleteFold(
gap = &curwin->w_folds;
found_ga = NULL;
lnum_off = 0;
- use_level = FALSE;
+ bool use_level = false;
for (;; ) {
if (!foldFind(gap, lnum - lnum_off, &fp))
break;
@@ -846,8 +845,6 @@ foldMoveTo(
linenr_T lnum_off;
linenr_T lnum_found;
linenr_T lnum;
- int use_level;
- int maybe_small;
garray_T *gap;
fold_T *fp;
int level;
@@ -861,8 +858,8 @@ foldMoveTo(
* that moves the cursor is used. */
lnum_off = 0;
gap = &curwin->w_folds;
- use_level = FALSE;
- maybe_small = FALSE;
+ bool use_level = false;
+ bool maybe_small = false;
lnum_found = curwin->w_cursor.lnum;
level = 0;
last = FALSE;
@@ -1506,9 +1503,9 @@ static int getDeepestNestingRecurse(garray_T *gap)
static bool check_closed(
win_T *const win,
fold_T *const fp,
- int *const use_levelp, // TRUE: outer fold had FD_LEVEL
+ bool *const use_levelp, // true: outer fold had FD_LEVEL
const int level, // folding depth
- int *const maybe_smallp, // TRUE: outer this had fd_small == kNone
+ bool *const maybe_smallp, // true: outer this had fd_small == kNone
const linenr_T lnum_off // line number offset for fp->fd_top
)
{
@@ -1517,7 +1514,7 @@ static bool check_closed(
/* Check if this fold is closed. If the flag is FD_LEVEL this
* fold and all folds it contains depend on 'foldlevel'. */
if (*use_levelp || fp->fd_flags == FD_LEVEL) {
- *use_levelp = TRUE;
+ *use_levelp = true;
if (level >= win->w_p_fdl) {
closed = true;
}
@@ -1527,7 +1524,7 @@ static bool check_closed(
// Small fold isn't closed anyway.
if (fp->fd_small == kNone) {
- *maybe_smallp = TRUE;
+ *maybe_smallp = true;
}
if (closed) {
if (*maybe_smallp) {