git.y1.nz

mtm

Ncurses-based terminal multiplexer
download: https://git.y1.nz/archives/mtm.tar.gz
Files | Log | Refs

commit 0cd3fd3ea858e81c10d554c49a82a867e115ff4e
parent 3d0badfd0f1e5c7b34caaaf6a537058fae927fa3
Author: Rob King <jking@deadpixi.com>
Date:   Mon, 24 Jul 2017 09:59:22 -0500

Selectively enable A_ITALIC.

Diffstat:
Mconfig.def.h5+++++
Mmtm.c6++++--
2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/config.def.h b/config.def.h @@ -7,6 +7,11 @@ * KEY_CODE_YES). */ +/* Old versions of ncurses don't support A_ITALIC. + * Define this to disable it if the situation isn't automatically detected. +#define NO_ITALICS + */ + /* How often to check for status updates by default. */ #define STATUSINTERVAL 60 diff --git a/mtm.c b/mtm.c @@ -331,12 +331,10 @@ HANDLER(sgr) /* SGR - Select Graphic Rendition */ for (int i = 0; i < argc; i++) switch (P0(i)){ case 0: CALL(sgr0); break; case 1: wattron(win, A_BOLD); break; - case 3: wattron(win, A_ITALIC); break; case 4: wattron(win, A_UNDERLINE); break; case 5: wattron(win, A_BLINK); break; case 7: wattron(win, A_REVERSE); break; case 8: wattron(win, A_INVIS); break; - case 23: wattroff(win, A_ITALIC); break; case 24: wattroff(win, A_UNDERLINE); break; case 27: wattroff(win, A_REVERSE); break; case 30: n->fg = COLOR_BLACK; doc = true; break; @@ -357,6 +355,10 @@ HANDLER(sgr) /* SGR - Select Graphic Rendition */ case 46: n->bg = COLOR_CYAN; doc = true; break; case 47: n->bg = COLOR_WHITE; doc = true; break; case 49: n->bg = -1; doc = true; break; + #if defined(A_ITALIC) && !defined(NO_ITALICS) + case 3: wattron(win, A_ITALIC); break; + case 23: wattroff(win, A_ITALIC); break; + #endif } if (doc)

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.