From 5c17393d2b0830838e8e47f105ef734d3b235275 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Sat, 1 Dec 2018 22:05:37 -0500 Subject: Crudely handle reconnecting after suspend --- ui.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'ui.c') diff --git a/ui.c b/ui.c index fecd637..0b25d97 100644 --- a/ui.c +++ b/ui.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -81,9 +82,10 @@ static struct { struct View *view; } ui; -static void uiShow(void) { +void uiShow(void) { ui.hide = false; termMode(TermFocus, true); + uiDraw(); } void uiHide(void) { @@ -109,12 +111,13 @@ void uiInit(void) { uiViewTag(TagStatus); } -void uiExit(void) { +noreturn void uiExit(void) { uiHide(); printf( "This program is AGPLv3 Free Software!\n" "The source is available at <" SOURCE_URL ">.\n" ); + exit(EX_OK); } static int lastLine(void) { @@ -557,7 +560,6 @@ void uiPrompt(void) { } void uiRead(void) { - uiShow(); int ret; wint_t ch; while (ERR != (ret = wget_wch(ui.input, &ch))) { -- cgit 1.4.0 ='/catgirl/?h=2.0'>summary refs log tree commit diff
Commit message (Collapse)Author
2018-08-07Hack clang into checking uiFmt format stringsJune McEnroe
2018-08-07Handle PART and QUIT without messagesJune McEnroe
2018-08-07Make safe filling the who bufferJune McEnroe
2018-08-07Add reverse and reset IRC formatting codesJune McEnroe
2018-08-06Rewrite line editing again, add formattingJune McEnroe
2018-08-06Fix allocation size in vaswprintfJune McEnroe
This is so embarrassing. It only started crashing once it had strings that were long enough, and then it took me so long to notice this mistake. I was worried I was still doing va_list wrong somehow.
2018-08-06Implement word wrappingJune McEnroe
2018-08-06Use wchar_t strings for all of UIJune McEnroe
vaswprintf is a nightmare.
2018-08-06Rename line editing functionsJune McEnroe
2018-08-05Initialize all possible color pairsJune McEnroe
This is actually possible with use_default_colors!
2018-08-05Refactor color initializationJune McEnroe
2018-08-05Add ^L redrawJune McEnroe
2018-08-05Use 16 colors if availableJune McEnroe
Fall back to using bold if there are only 8 colors. This also allowed bright background colors in 16-color terminals. I must port this system to torus. I'll be able to remove the awful termcap patch hack.
2018-08-05Limit parsed colors to number of mIRC colorsJune McEnroe
Oh boy that's embarrassing.
2018-08-04Show source link on exitJune McEnroe
2018-08-04Implement line editing, scrollingJune McEnroe
Don't really have a way to implement the M-* keys, and currently missing C-w.
2018-08-04Handle /topicJune McEnroe