From c51c2f5a65881b2057907338099e12fa19811d41 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 2 Aug 2018 23:11:25 -0400 Subject: misc: refactor plines_win{,_nofill}() Add const to params and variables (declare and init on same line). winheight (param) is bool so replace TRUE/FALSE macros with true/false. --- src/nvim/screen.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/nvim/screen.c') diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 24ea221c78..72b4a3a4f8 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -990,7 +990,7 @@ static void win_update(win_T *wp) * when it won't get updated below. */ if (wp->w_p_diff && bot_start > 0) wp->w_lines[0].wl_size = - plines_win_nofill(wp, wp->w_topline, TRUE) + plines_win_nofill(wp, wp->w_topline, true) + wp->w_topfill; } } @@ -1447,12 +1447,13 @@ static void win_update(win_T *wp) } wp->w_lines[idx].wl_lnum = lnum; - wp->w_lines[idx].wl_valid = TRUE; - if (row > wp->w_height) { /* past end of screen */ - /* we may need the size of that too long line later on */ - if (dollar_vcol == -1) - wp->w_lines[idx].wl_size = plines_win(wp, lnum, TRUE); - ++idx; + wp->w_lines[idx].wl_valid = true; + if (row > wp->w_height) { // past end of screen + // we may need the size of that too long line later on + if (dollar_vcol == -1) { + wp->w_lines[idx].wl_size = plines_win(wp, lnum, true); + } + idx++; break; } if (dollar_vcol == -1) -- cgit