From 108012950e68a5fb276540906db957b973480604 Mon Sep 17 00:00:00 2001 From: nick black Date: Sat, 4 Sep 2021 19:07:09 -0400 Subject: [PATCH] notcurses-info: indicate that el capability is present --- doc/man/man1/notcurses-info.1.md | 17 +++++++++++------ src/info/main.c | 15 ++++++++------- src/lib/termdesc.c | 1 + src/lib/termdesc.h | 1 + 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/doc/man/man1/notcurses-info.1.md b/doc/man/man1/notcurses-info.1.md index 1e0292175..e57bbf074 100644 --- a/doc/man/man1/notcurses-info.1.md +++ b/doc/man/man1/notcurses-info.1.md @@ -52,6 +52,7 @@ The next five lines describe properties of the terminal environment: * op: Colors can be reset via a single escape * fgop: Foreground can be reset via a single escape * bgop: Background can be reset via a single escape + * bce: The back-color-erase property is in play * The second line is more of the same: * bold: Boldface is available @@ -62,14 +63,18 @@ The next five lines describe properties of the terminal environment: * u7: Cursor position reporting * ccc: Palette can be reprogrammed * rgb: Colors can be specified as RGB wit eight bits/channel + * el: Clearing can be performed through the end of the line -* The third line covers UTF8 and decoding capabilities: +* The third line also covers UTF8 and decoding capabilities: * utf8: This is a UTF8 environment - * quad: Quadrant characters are available - * sex: Sextant characters are available - * braille: Braille characters are available - * images: Images can be decoded - * video: Video can be decoded + * 2x1: Upper- and lower-half blocks are available + * 2x2: Quadrant blocks are available + * 3x2: Sextant blocks are available + * 4x2: Braille characters are available + * img: Images can be decoded + * vid: Video can be decoded + * indn: Multiple-line scrolling is available + * gpm: Connection is established to the GPM server * The fourth line indicates the default background color, and whether that color is treated as transparent. diff --git a/src/info/main.c b/src/info/main.c index b151ad0ff..502064754 100644 --- a/src/info/main.c +++ b/src/info/main.c @@ -399,17 +399,18 @@ tinfo_debug_styles(const notcurses* nc, struct ncplane* n, const char* indent){ tinfo_debug_cap(n, "u7", get_escape(ti, ESCAPE_U7)); tinfo_debug_cap(n, "ccc", ti->caps.can_change_colors); tinfo_debug_cap(n, "rgb", ti->caps.rgb); - tinfo_debug_cap(n, "gpm", ti->gpmfd >= 0); + tinfo_debug_cap(n, "el", get_escape(ti, ESCAPE_EL)); finish_line(n); ncplane_putstr(n, indent); tinfo_debug_cap(n, "utf8", ti->caps.utf8); - tinfo_debug_cap(n, "half", ti->caps.halfblocks); - tinfo_debug_cap(n, "quad", ti->caps.quadrants); - tinfo_debug_cap(n, "sex", ti->caps.sextants); - tinfo_debug_cap(n, "braille", ti->caps.braille); - tinfo_debug_cap(n, "images", notcurses_canopen_images(nc)); - tinfo_debug_cap(n, "video", notcurses_canopen_videos(nc)); + tinfo_debug_cap(n, "2x1", ti->caps.halfblocks); + tinfo_debug_cap(n, "2x2", ti->caps.quadrants); + tinfo_debug_cap(n, "3x2", ti->caps.sextants); + tinfo_debug_cap(n, "4x2", ti->caps.braille); + tinfo_debug_cap(n, "img", notcurses_canopen_images(nc)); + tinfo_debug_cap(n, "vid", notcurses_canopen_videos(nc)); tinfo_debug_cap(n, "indn", get_escape(ti, ESCAPE_INDN)); + tinfo_debug_cap(n, "gpm", ti->gpmfd >= 0); finish_line(n); } diff --git a/src/lib/termdesc.c b/src/lib/termdesc.c index 0db729e8e..60a9dce30 100644 --- a/src/lib/termdesc.c +++ b/src/lib/termdesc.c @@ -821,6 +821,7 @@ int interrogate_terminfo(tinfo* ti, const char* termtype, FILE* out, unsigned ut { ESCAPE_U7, "u7", }, { ESCAPE_SMKX, "smkx", }, { ESCAPE_SMXX, "smxx", }, + { ESCAPE_EL, "el", }, { ESCAPE_RMXX, "rmxx", }, { ESCAPE_SMUL, "smul", }, { ESCAPE_RMUL, "rmul", }, diff --git a/src/lib/termdesc.h b/src/lib/termdesc.h index 890bc8a96..394ed2e03 100644 --- a/src/lib/termdesc.h +++ b/src/lib/termdesc.h @@ -54,6 +54,7 @@ typedef enum { ESCAPE_CUD, // "cud" move n cells down ESCAPE_SMKX, // "smkx" keypad_xmit (keypad transmit mode) ESCAPE_RMKX, // "rmkx" keypad_local + ESCAPE_EL, // "el" clear to end of line, inclusive ESCAPE_SMCUP, // "smcup" enter alternate screen ESCAPE_RMCUP, // "rmcup" leave alternate screen ESCAPE_SMXX, // "smxx" start struckout