git.y1.nz

mtm

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

commit 66e35f8854507c5775d4340d8baa7ed4b72b919a
parent f23c12c016aa03434ff63c75892bfc7bf5910c99
Author: Rob King <jking@deadpixi.com>
Date:   Sun,  9 Jul 2017 23:58:23 -0500

Simplified xenl processing.

Diffstat:
Mmtm.c14++++----------
1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/mtm.c b/mtm.c @@ -374,11 +374,6 @@ HANDLER(osc) /* OSC - Operating System Command */ 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; @@ -392,12 +387,11 @@ HANDLER(print) /* Print a character to the terminal */ getyx(win, y, x); } - wattr_get(win, &a, &cp, NULL); - setcchar(&r, s, a, cp, NULL); - wadd_wchnstr(win, &r, 1); - - if (wmove(win, y, x + wcwidth(w)) == ERR) + if (x == mx - wcwidth(w)){ n->xenl = true; + wins_nwstr(win, &w, 1); + } else + waddnwstr(win, &w, 1); wnoutrefresh(win); ENDHANDLER

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