diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-08-02 23:11:25 -0400 |
---|---|---|
committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-08-02 23:11:27 -0400 |
commit | c51c2f5a65881b2057907338099e12fa19811d41 (patch) | |
tree | 4cd12fb632635e1173690f964d9907dd5fe5680c /src/nvim/screen.c | |
parent | 766683622a83c0e40f9aa152aec87bd67f87f21a (diff) | |
download | rneovim-c51c2f5a65881b2057907338099e12fa19811d41.tar.gz rneovim-c51c2f5a65881b2057907338099e12fa19811d41.tar.bz2 rneovim-c51c2f5a65881b2057907338099e12fa19811d41.zip |
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.
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r-- | src/nvim/screen.c | 15 |
1 files changed, 8 insertions, 7 deletions
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) |