Skip to content

Commit

Permalink
[view_curses] check for -1 bg
Browse files Browse the repository at this point in the history
Related to #1245
  • Loading branch information
tstack committed Mar 31, 2024
1 parent f06b686 commit 3a63791
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/view_curses.cc
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,9 @@ view_curses::mvwattrline(WINDOW* window,
short cur_fg, cur_bg;
pair_content(cur_pair, &cur_fg, &cur_bg);

if (fg_color[lpc] != -1 && bg_color[lpc] == -1) {
if (fg_color[lpc] != -1 && bg_color[lpc] == -1
&& base_attrs.ta_bg_color.value_or(0) >= 0)
{
const auto& fg_color_info
= view_colors::vc_active_palette->tc_palette[fg_color[lpc]];
const auto& bg_color_info
Expand Down

0 comments on commit 3a63791

Please sign in to comment.