diff options
author | June McEnroe <june@causal.agency> | 2018-08-09 00:24:49 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2018-08-09 00:24:49 -0400 |
commit | a64f1a4ea2962e534673e27d85d92703c64201b0 (patch) | |
tree | 1bcf8ffdf2ae7280b406fe021619e9c61b83de6b /ui.c | |
parent | Add commands to tab complete (diff) | |
download | catgirl-a64f1a4ea2962e534673e27d85d92703c64201b0.tar.gz catgirl-a64f1a4ea2962e534673e27d85d92703c64201b0.zip |
Add URL detection, listing and opening
Might also add /copy, like /open.
Diffstat (limited to '')
-rw-r--r-- | ui.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/ui.c b/ui.c index be7fc15..9778473 100644 --- a/ui.c +++ b/ui.c @@ -99,8 +99,9 @@ static struct { WINDOW *topic; WINDOW *log; WINDOW *input; - int scroll; + bool hide; bool mark; + int scroll; } ui; void uiInit(void) { @@ -135,8 +136,13 @@ static void uiResize(void) { } void uiHide(void) { - focusDisable(); + ui.hide = true; endwin(); +} + +void uiExit(void) { + uiHide(); + focusDisable(); printf( "This program is AGPLv3 free software!\n" "The source is available at <" SOURCE_URL ">.\n" @@ -144,6 +150,7 @@ void uiHide(void) { } void uiDraw(void) { + if (ui.hide) return; pnoutrefresh( ui.topic, 0, 0, @@ -359,6 +366,8 @@ static bool keyCode(wint_t ch) { } void uiRead(void) { + ui.hide = false; + bool update = false; int ret; wint_t ch; |