mtm | Ncurses-based terminal multiplexer |
| download: https://git.y1.nz/archives/mtm.tar.gz | |
| Files | Log | Refs |
commit d54d3dfa974cd121e55f25b4472cc91da70fda64 parent 17bfc78021d7724e7359f208bbf96804fc7d1ce9 Author: Rob King <rob@frigidriver.com> Date: Wed, 17 Jun 2020 23:41:38 -0500 Better error handling. Diffstat:
| M | pair.c | 5 | ++--- |
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/pair.c b/pair.c @@ -30,10 +30,9 @@ mtm_alloc_pair(int fg, int bg) if (p->cp == -1){ p->fg = fg; p->bg = bg; - p->cp = i + 1; - init_pair(p->cp, p->fg, p->bg); + p->cp = init_pair(i + 1, p->fg, p->bg) == OK? i + 1 : -1; } - if (p->fg == fg && p->bg == bg) + if (p->fg == fg && p->bg == bg && p->cp != -1) return p->cp; } return 0;
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.