git.y1.nz

mtm

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

commit 9282cb880f574ec28bc0516887f9e5572dca68cc
parent dc529cff5cb873d0880a7678bb5387aaf10e45d7
Author: Rob King <jking@deadpixi.com>
Date:   Sat, 24 Jun 2017 00:04:12 -0500

Remove redundant pnl function.

Diffstat:
Mmtm.c20++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/mtm.c b/mtm.c @@ -358,11 +358,12 @@ HANDLER(ind) /* IND - Index */ y == bot - 1? scroll(win) : wmove(win, y + 1, x); ENDHANDLER -HANDLER(pnl) /* NL - Newline */ - ind(v, p, w, 0, 0, NULL); -ENDHANDLER - HANDLER(print) /* Print a character to the terminal */ + cchar_t r; + attr_t a = A_NORMAL; + short cp = 0; + wchar_t s[] = {w, 0}; + if (wcwidth(w) < 0) return; @@ -374,11 +375,6 @@ HANDLER(print) /* Print a character to the terminal */ getyx(win, y, x); } - cchar_t r; - attr_t a = A_NORMAL; - short cp = 0; - wchar_t s[] = {w, 0}; - wattr_get(win, &a, &cp, NULL); setcchar(&r, s, a, cp, NULL); wadd_wchnstr(win, &r, 1); @@ -401,9 +397,9 @@ setupevents(NODE *n) vtparser_onevent(n->vp, VTPARSER_CONTROL, 0x07, bell); vtparser_onevent(n->vp, VTPARSER_CONTROL, 0x08, cub); vtparser_onevent(n->vp, VTPARSER_CONTROL, 0x09, tab); - vtparser_onevent(n->vp, VTPARSER_CONTROL, 0x0a, pnl); - vtparser_onevent(n->vp, VTPARSER_CONTROL, 0x0b, pnl); - vtparser_onevent(n->vp, VTPARSER_CONTROL, 0x0c, pnl); + vtparser_onevent(n->vp, VTPARSER_CONTROL, 0x0a, ind); + vtparser_onevent(n->vp, VTPARSER_CONTROL, 0x0b, ind); + vtparser_onevent(n->vp, VTPARSER_CONTROL, 0x0c, ind); vtparser_onevent(n->vp, VTPARSER_CONTROL, 0x0d, cr); vtparser_onevent(n->vp, VTPARSER_CSI, L'A', cuu); vtparser_onevent(n->vp, VTPARSER_CSI, L'B', cud);

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