mtm | Ncurses-based terminal multiplexer |
| download: https://git.y1.nz/archives/mtm.tar.gz | |
| Files | Log | Refs |
commit 5ac75fd1ac67e9080a49f2af619e2f3fb1448d9f parent c78c7d16dc7ad52f668c811a99bf3d42342405fa Author: Rob King <jking@deadpixi.com> Date: Thu, 13 Apr 2017 17:22:57 -0500 Added sr. Diffstat:
| M | mtm.c | 13 | ++++++++----- |
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/mtm.c b/mtm.c @@ -252,11 +252,11 @@ HANDLER(su) /* SU - Scroll Up/Down */ wscrl(win, c); ENDHANDLER -HANDLER(sl) /* SL - Scroll Left */ +HANDLER(sl) /* SL/SR - Scroll Left or Right */ for (int r = 0; r < my; r++){ wmove(win, r, 0); for (int i = 0; i < P1(0); i++) - wdelch(win); + (w == L'@')? wdelch(win) : wins_nwstr(win, L" ", 1); } wmove(win, y, x); ENDHANDLER @@ -287,8 +287,11 @@ HANDLER(ech) /* ECH - Erase Character */ wmove(win, y, x); ENDHANDLER -HANDLER(cuu) /* CUU - Cursor Up */ - wmove(win, MAX(y - P1(0), n->top), x); +HANDLER(cuuorsr) /* CUU or SR - Cursor Up or Scroll Right */ + if (iw == L' ') + sl(v, p, w, iw, argc, argv); + else + wmove(win, MAX(y - P1(0), n->top), x); ENDHANDLER HANDLER(cud) /* CUD - Cursor Down */ @@ -619,7 +622,7 @@ setupevents(NODE *n) /* Wire up escape sequences to functions. */ vtparser_onevent(n->vp, VTPARSER_CONTROL, 0x0d, cr); vtparser_onevent(n->vp, VTPARSER_CONTROL, 0x0e, so); vtparser_onevent(n->vp, VTPARSER_CONTROL, 0x0f, so); - vtparser_onevent(n->vp, VTPARSER_CSI, L'A', cuu); + vtparser_onevent(n->vp, VTPARSER_CSI, L'A', cuuorsr); vtparser_onevent(n->vp, VTPARSER_CSI, L'B', cud); vtparser_onevent(n->vp, VTPARSER_CSI, L'C', cuf); vtparser_onevent(n->vp, VTPARSER_CSI, L'D', cub);
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.