PVS/V768: do use enum as bool #10582

Fix win_draw_end invocation, pass HLF symbol explicitly.
This commit is contained in:
Ihor Antonov 2019-07-25 15:57:58 -04:00 committed by Justin M. Keyes
parent 36622014c6
commit 8a9c9a9963

View File

@ -1477,7 +1477,7 @@ static void win_update(win_T *wp)
set_empty_rows(wp, srow); set_empty_rows(wp, srow);
wp->w_botline = lnum; wp->w_botline = lnum;
} else { } 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; wp->w_botline = lnum;
} }
} else { } 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, static void win_draw_end(win_T *wp, int c1, int c2, bool draw_margin, int row,
int endrow, hlf_T hl) int endrow, hlf_T hl)
{ {
assert(hl >= 0 && hl < HLF_COUNT);
int n = 0; int n = 0;
if (draw_margin) { 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, int attr = hl_combine_attr(wp->w_hl_attr_normal, win_hl_attr(wp, hl));
hl ? win_hl_attr(wp, hl) : 0);
if (wp->w_p_rl) { if (wp->w_p_rl) {
grid_fill(&wp->w_grid, row, endrow, wp->w_wincol, W_ENDCOL(wp) - 1 - n, grid_fill(&wp->w_grid, row, endrow, wp->w_wincol, W_ENDCOL(wp) - 1 - n,