aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIhor Antonov <ngortheone@users.noreply.github.com>2019-07-25 15:57:58 -0400
committerJustin M. Keyes <justinkz@gmail.com>2019-07-25 21:57:58 +0200
commit8a9c9a996322a1d111c55efb156710add68da358 (patch)
treed4039fad3dff64f22d513912dea183dcfdb276f0
parent36622014c640ad5df19269e63ad037c104efce9c (diff)
downloadrneovim-8a9c9a996322a1d111c55efb156710add68da358.tar.gz
rneovim-8a9c9a996322a1d111c55efb156710add68da358.tar.bz2
rneovim-8a9c9a996322a1d111c55efb156710add68da358.zip
PVS/V768: do use enum as bool #10582
Fix win_draw_end invocation, pass HLF symbol explicitly.
-rw-r--r--src/nvim/screen.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index 457141f911..3f0a85b874 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -1477,7 +1477,7 @@ static void win_update(win_T *wp)
set_empty_rows(wp, srow);
wp->w_botline = lnum;
} else {
- win_draw_end(wp, '@', ' ', true, srow, wp->w_grid.Rows, at_attr);
+ win_draw_end(wp, '@', ' ', true, srow, wp->w_grid.Rows, HLF_AT);
wp->w_botline = lnum;
}
} else {
@@ -1593,6 +1593,7 @@ static int win_fill_end(win_T *wp, int c1, int c2, int off, int width, int row,
static void win_draw_end(win_T *wp, int c1, int c2, bool draw_margin, int row,
int endrow, hlf_T hl)
{
+ assert(hl >= 0 && hl < HLF_COUNT);
int n = 0;
if (draw_margin) {
@@ -1615,8 +1616,7 @@ static void win_draw_end(win_T *wp, int c1, int c2, bool draw_margin, int row,
}
}
- int attr = hl_combine_attr(wp->w_hl_attr_normal,
- hl ? win_hl_attr(wp, hl) : 0);
+ int attr = hl_combine_attr(wp->w_hl_attr_normal, win_hl_attr(wp, hl));
if (wp->w_p_rl) {
grid_fill(&wp->w_grid, row, endrow, wp->w_wincol, W_ENDCOL(wp) - 1 - n,