diff options
author | June McEnroe <june@causal.agency> | 2020-02-09 14:09:27 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-02-09 14:09:27 -0500 |
commit | 5254e1035c5945407ee354276f839426fc17e432 (patch) | |
tree | 3dcbba594340dd4f5fd72bac0cced834fd9db1b9 /ui.c | |
parent | Add M-u (diff) | |
download | catgirl-5254e1035c5945407ee354276f839426fc17e432.tar.gz catgirl-5254e1035c5945407ee354276f839426fc17e432.zip |
Add /help
Now with automatic search! Also had to fix the SIGCHLD handling...
Diffstat (limited to 'ui.c')
-rw-r--r-- | ui.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ui.c b/ui.c index 9abfffc..66a9c59 100644 --- a/ui.c +++ b/ui.c @@ -156,13 +156,18 @@ static const char *ExitFocusMode = "\33[?1004l"; static const char *EnterPasteMode = "\33[?2004h"; static const char *ExitPasteMode = "\33[?2004l"; +static bool hidden; + void uiShow(void) { putp(EnterFocusMode); putp(EnterPasteMode); fflush(stdout); + hidden = false; + uiDraw(); } void uiHide(void) { + hidden = true; putp(ExitFocusMode); putp(ExitPasteMode); endwin(); @@ -250,6 +255,7 @@ void uiInit(void) { } void uiDraw(void) { + if (hidden) return; wnoutrefresh(status); struct Window *window = windows.active; pnoutrefresh( @@ -755,6 +761,7 @@ static void keyStyle(wchar_t ch) { } void uiRead(void) { + if (hidden) return; int ret; wint_t ch; static bool style; |