diff options
-rw-r--r-- | src/nvim/buffer_defs.h | 2 | ||||
-rw-r--r-- | src/nvim/misc1.c | 4 | ||||
-rw-r--r-- | src/nvim/move.c | 14 | ||||
-rw-r--r-- | src/nvim/screen.c | 4 |
4 files changed, 12 insertions, 12 deletions
diff --git a/src/nvim/buffer_defs.h b/src/nvim/buffer_defs.h index 9c8cdd41ae..98fbef9c87 100644 --- a/src/nvim/buffer_defs.h +++ b/src/nvim/buffer_defs.h @@ -1007,7 +1007,7 @@ struct window_S { * that the cursor is on. We use this to avoid extra calls to plines(). */ int w_cline_height; /* current size of cursor line */ - int w_cline_folded; /* cursor line is folded */ + bool w_cline_folded; /* cursor line is folded */ int w_cline_row; /* starting row of the cursor line */ diff --git a/src/nvim/misc1.c b/src/nvim/misc1.c index 6358651171..fd922375e3 100644 --- a/src/nvim/misc1.c +++ b/src/nvim/misc1.c @@ -2122,10 +2122,10 @@ static void changed_common(linenr_T lnum, colnr_T col, linenr_T lnume, long xtra * inserting lines just above a closed fold. */ i = hasFoldingWin(wp, lnum, &lnum, NULL, FALSE, NULL); if (wp->w_cursor.lnum == lnum) - wp->w_cline_folded = i; + wp->w_cline_folded = (i == TRUE); i = hasFoldingWin(wp, lnume, NULL, &lnume, FALSE, NULL); if (wp->w_cursor.lnum == lnume) - wp->w_cline_folded = i; + wp->w_cline_folded = (i == TRUE); /* If the changed line is in a range of previously folded lines, * compare with the first line in that range. */ diff --git a/src/nvim/move.c b/src/nvim/move.c index ac15d9e927..7e0d1ed775 100644 --- a/src/nvim/move.c +++ b/src/nvim/move.c @@ -58,7 +58,7 @@ static void comp_botline(win_T *wp) linenr_T lnum; int done; linenr_T last; - int folded; + bool folded; /* * If w_cline_row is valid, start there. @@ -75,10 +75,10 @@ static void comp_botline(win_T *wp) for (; lnum <= wp->w_buffer->b_ml.ml_line_count; ++lnum) { last = lnum; - folded = FALSE; + folded = false; if (hasFoldingWin(wp, lnum, NULL, &last, TRUE, NULL)) { n = 1; - folded = TRUE; + folded = true; } else if (lnum == wp->w_topline) n = plines_win_nofill(wp, lnum, TRUE) + wp->w_topfill; else @@ -596,15 +596,15 @@ static void curs_rows(win_T *wp) else wp->w_cline_height = plines_win(wp, wp->w_cursor.lnum, TRUE); wp->w_cline_folded = hasFoldingWin(wp, wp->w_cursor.lnum, - NULL, NULL, TRUE, NULL); + NULL, NULL, TRUE, NULL) == TRUE; } else if (i > wp->w_lines_valid) { /* a line that is too long to fit on the last screen line */ wp->w_cline_height = 0; wp->w_cline_folded = hasFoldingWin(wp, wp->w_cursor.lnum, - NULL, NULL, TRUE, NULL); + NULL, NULL, TRUE, NULL) == TRUE; } else { wp->w_cline_height = wp->w_lines[i].wl_size; - wp->w_cline_folded = wp->w_lines[i].wl_folded; + wp->w_cline_folded = wp->w_lines[i].wl_folded == TRUE; } } @@ -648,7 +648,7 @@ static void validate_cheight(void) + curwin->w_topfill; else curwin->w_cline_height = plines(curwin->w_cursor.lnum); - curwin->w_cline_folded = hasFolding(curwin->w_cursor.lnum, NULL, NULL); + curwin->w_cline_folded = hasFolding(curwin->w_cursor.lnum, NULL, NULL) == TRUE; curwin->w_valid |= VALID_CHEIGHT; } } diff --git a/src/nvim/screen.c b/src/nvim/screen.c index b40bf9ab5d..0c4cf30602 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -1992,7 +1992,7 @@ static void fold_line(win_T *wp, long fold_count, foldinfo_T *foldinfo, linenr_T && lnume >= curwin->w_cursor.lnum) { curwin->w_cline_row = row; curwin->w_cline_height = 1; - curwin->w_cline_folded = TRUE; + curwin->w_cline_folded = true; curwin->w_valid |= (VALID_CHEIGHT|VALID_CROW); } } @@ -3866,7 +3866,7 @@ win_line ( if (wp == curwin && lnum == curwin->w_cursor.lnum) { curwin->w_cline_row = startrow; curwin->w_cline_height = row - startrow; - curwin->w_cline_folded = FALSE; + curwin->w_cline_folded = false; curwin->w_valid |= (VALID_CHEIGHT|VALID_CROW); } |