From a64f1a4ea2962e534673e27d85d92703c64201b0 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Thu, 9 Aug 2018 00:24:49 -0400 Subject: Add URL detection, listing and opening Might also add /copy, like /open. --- ui.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'ui.c') 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; -- cgit 1.4.1-2-gfad0