diff --git a/TERMS.md b/TERMS.md index 7111e3166..c6343c658 100644 --- a/TERMS.md +++ b/TERMS.md @@ -26,6 +26,7 @@ The following have been established on a Debian Unstable workstation. | Sakura | ✔ |`TERM=vte-256color` `COLORTERM=24bit` | No terminfo entry? | | mlterm | 🗴 |`TERM=mlterm-256color` | Do not set `COLORTERM`. `mlterm-direct` gives strange results. | | st | ✔ |`TERM=st-256color` `COLORTERM=24bit` | | +| wterm | | | | | GNU Screen | 🗴 |`TERM=screen.OLDTERM` | Must be compiled with `--enable-256color`. `TERM` should typically be `screen.` suffixed by the appropriate `TERM` value for the true connected terminal, e.g. `screen.vte-256color`. See below. | | tmux | | | | diff --git a/src/demo/hud.c b/src/demo/hud.c index ba0277be4..9a77d1562 100644 --- a/src/demo/hud.c +++ b/src/demo/hud.c @@ -502,7 +502,7 @@ int hud_schedule(const char* demoname){ return hud_print_finished(elems); } -// wake up every 100ms and render a frame so the HUD doesn't appear locked up. +// wake up every 10ms and render a frame so the HUD doesn't appear locked up. // provide an absolute deadline calculated via CLOCK_MONOTONIC. static int demo_nanosleep_abstime_ns(struct notcurses* nc, uint64_t deadline){ diff --git a/src/lib/blit.c b/src/lib/blit.c index d57f6b579..33e4ec1af 100644 --- a/src/lib/blit.c +++ b/src/lib/blit.c @@ -788,7 +788,7 @@ const struct blitset notcurses_blitters[] = { { .geom = NCBLIT_2x2, .width = 2, .height = 2, .egcs = L" ▗▐▖▄▟▌▙█", .blit = quadrant_blit, .name = "quadblitter", .fill = false, }, { .geom = NCBLIT_3x2, .width = 2, .height = 3, .egcs = L" 🬞🬦▐🬏🬭🬵🬷🬓🬱🬹🬻▌🬲🬺█", - .blit = sextant_blit, .name = "sexblitter", .fill = false, }, + .blit = sextant_blit, .name = "sexblitter", .fill = false, }, { .geom = NCBLIT_4x1, .width = 1, .height = 4, .egcs = L" ▂▄▆█", .blit = tria_blit, .name = "fourstep", .fill = false, }, { .geom = NCBLIT_BRAILLE, .width = 2, .height = 4, .egcs = L"⠀⢀⢠⢰⢸⡀⣀⣠⣰⣸⡄⣄⣤⣴⣼⡆⣆⣦⣶⣾⡇⣇⣧⣷⣿", diff --git a/src/lib/plot.h b/src/lib/plot.h index 9523695b2..9639d4ac8 100644 --- a/src/lib/plot.h +++ b/src/lib/plot.h @@ -227,11 +227,9 @@ class ncppplot { double scaled = log(gvals[i] - miny) / log(interval); double sival = intervalbase ? log(intervalbase) / log(interval) : 0; egcidx = scaled - sival; -//fprintf(stderr, "egcidx: %zu gvals: %u interval: %f scaled: %f sival: %f\n", egcidx, gvals[i], interval, scaled, sival); }else{ egcidx = (gvals[i] - intervalbase) / interval; } -//fprintf(stderr, "%d/%d ibase: %f ival: %f egcidx: %zu\n", dimy - y - 1, x, intervalbase, interval, egcidx); if(egcidx >= states){ egcidx = states - 1; done = false; @@ -246,8 +244,19 @@ class ncppplot { // we need handle ASCII differently, since it can't print full block. // in ASCII mode, egcidx != means swap colors and use space. if(sumidx){ +//fprintf(stderr, "dimy: %d y: %d x: %d sumidx: %zu egc[%zu]: %lc\n", dimy, y, x, sumidx, sumidx, egc[sumidx]); if(notcurses_canutf8(ncplane_notcurses(ncp))){ - if(ncplane_putwc_yx(ncp, dimy - y - 1, x, egc[sumidx]) <= 0){ + char utf8[MB_CUR_MAX + 1]; + int bytes = wctomb(utf8, egc[sumidx]); + if(bytes < 0){ + return -1; + } + utf8[bytes] = '\0'; + cell* c = ncplane_cell_ref_yx(ncp, dimy - y - 1, x); + cell_set_bchannel(c, channels_bchannel(channels)); + cell_set_fchannel(c, channels_fchannel(channels)); + cell_set_styles(c, NCSTYLE_NONE); + if(pool_blit_direct(&ncp->pool, c, utf8, bytes, 1) <= 0){ return -1; } }else{