Skip to content

Commit

Permalink
[termdesc] don't enable sixel graphics with 0 color registers
Browse files Browse the repository at this point in the history
  • Loading branch information
dankamongmen committed Jan 1, 2022
1 parent dba86c7 commit 03160d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/lib/termdesc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1362,10 +1362,13 @@ int interrogate_terminfo(tinfo* ti, FILE* out, unsigned utf8,
}
build_supported_styles(ti);
if(ti->pixel_draw == NULL && ti->pixel_draw_late == NULL){
// color_registers was only assigned if kitty_graphics were unavailable
if(ti->color_registers > 0){
setup_sixel_bitmaps(ti, ti->ttyfd, invertsixel);
}
if(kitty_graphics){
setup_kitty_bitmaps(ti, ti->ttyfd, NCPIXEL_KITTY_STATIC);
}
setup_sixel_bitmaps(ti, ti->ttyfd, invertsixel);
}
return 0;

Expand Down
2 changes: 0 additions & 2 deletions src/tests/direct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ TEST_CASE("Direct") {
}
}

/*
#ifndef NOTCURSES_USE_MULTIMEDIA
SUBCASE("VisualDisabled"){
CHECK(!ncdirect_canopen_images(nc_));
Expand Down Expand Up @@ -172,7 +171,6 @@ TEST_CASE("Direct") {
}
}
#endif
*/

CHECK(0 == ncdirect_stop(nc_));

Expand Down

0 comments on commit 03160d9

Please sign in to comment.