mtm | Ncurses-based terminal multiplexer |
| download: https://git.y1.nz/archives/mtm.tar.gz | |
| Files | Log | Refs |
commit e1c39432abe6b7430c16a79337cf565af6b36fb5 parent 94ec91e8666959861fd4cb2e993feb5d47da14a4 Author: Rob King <jking@deadpixi.com> Date: Fri, 23 Jun 2017 23:06:41 -0500 Refactor RIS. Diffstat:
| M | mtm.c | 11 | ++++++----- |
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/mtm.c b/mtm.c @@ -304,6 +304,8 @@ HANDLER(ris) /* RIS - Reset to Initial State */ sgr0(v, p, 0, 0, 0, NULL); wclear(win); wmove(win, 0, 0); + n->fg = n->bg = -1; + n->vis = 1; n->insert = n->oxenl = n->xenl = false; wsetscrreg(win, 0, n->h - 1); ENDHANDLER @@ -495,22 +497,21 @@ newview(NODE *p, int y, int x, int h, int w) /* Open a new view. */ if (!n) return NULL; - /* XXX - use ris here */ - n->fg = n->bg = -1; - n->vis = 1; n->win = newwin(h, w, y, x); + if (!n->win) + return freenode(n, false), NULL; nodelay(n->win, TRUE); scrollok(n->win, TRUE); idlok(n->win, TRUE); keypad(n->win, TRUE); - if (!n->win) - return freenode(n, false), NULL; n->vp = vtparser_open(n); if (!n->vp) return freenode(n, false), NULL; setupevents(n); + ris(n->vp, n, L'c', 0, 0, NULL); + pid_t pid = forkpty(&n->pt, NULL, NULL, &ws); if (pid < 0) return freenode(n, false), NULL;
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.