mtm | Ncurses-based terminal multiplexer |
| download: https://git.y1.nz/archives/mtm.tar.gz | |
| Files | Log | Refs |
commit 3ab8190334c1500cfdd94914d116027289011b5d parent c54dd2d41404260f4228fa00cacf67d27e91aa4f Author: Rob King <jking@deadpixi.com> Date: Wed, 12 Apr 2017 22:45:16 -0500 Added hpr and vpr, fixed hpa. Diffstat:
| M | mtm.c | 12 | +++++++++++- |
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/mtm.c b/mtm.c @@ -495,8 +495,16 @@ HANDLER(vpa) /* VPA - Cursor Vertical Absolute */ wmove(win, MIN(n->bot - 1, MAX(n->top, P1(0) - 1)), x); ENDHANDLER +HANDLER(vpr) /* VPR - Cursor Vertical Relative */ + wmove(win, MIN(n->bot - 1, MAX(n->top, y + P1(0))), x); +ENDHANDLER + HANDLER(hpa) /* HPA - Cursor Horizontal Absolute */ - wmove(win, y, P1(0) - 1); + wmove(win, y, MIN(P1(0) - 1, mx - 1)); +ENDHANDLER + +HANDLER(hpr) /* HPR - Cursor Horizontal Relative */ + wmove(win, y, MIN(x + P1(0), mx - 1)); ENDHANDLER HANDLER(cbt) /* CBT - Cursor Backwards Tab */ @@ -596,8 +604,10 @@ setupevents(NODE *n) /* Wire up escape sequences to functions. */ vtparser_onevent(n->vp, VTPARSER_CSI, L'Z', tab); vtparser_onevent(n->vp, VTPARSER_CSI, L'@', ich); vtparser_onevent(n->vp, VTPARSER_CSI, L'`', hpa); + vtparser_onevent(n->vp, VTPARSER_CSI, L'a', hpr); vtparser_onevent(n->vp, VTPARSER_CSI, L'c', decid); vtparser_onevent(n->vp, VTPARSER_CSI, L'd', vpa); + vtparser_onevent(n->vp, VTPARSER_CSI, L'e', vpr); vtparser_onevent(n->vp, VTPARSER_CSI, L'f', cup); vtparser_onevent(n->vp, VTPARSER_CSI, L'g', tbc); vtparser_onevent(n->vp, VTPARSER_CSI, L'h', mode);
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.