From 2ec109e246dc4e654dd8f65637310a34f121526d Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Sun, 12 Aug 2018 20:41:13 -0400 Subject: Disable focus tracking in uiHide Most significantly so that the sequences don't end up on screen during a /url. --- ui.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/ui.c b/ui.c index 72ff0f4..9f198c4 100644 --- a/ui.c +++ b/ui.c @@ -131,6 +131,17 @@ static struct View *viewTag(struct Tag tag) { return view; } +void uiHide(void) { + ui.hide = true; + termMode(TERM_FOCUS, false); + endwin(); +} + +static void uiShow(void) { + ui.hide = false; + termMode(TERM_FOCUS, true); +} + void uiInit(void) { setlocale(LC_CTYPE, ""); initscr(); @@ -138,7 +149,6 @@ void uiInit(void) { noecho(); colorInit(); - termMode(TERM_FOCUS, true); ui.input = newpad(2, INPUT_COLS); mvwhline(ui.input, 0, 0, ACS_HLINE, INPUT_COLS); @@ -147,16 +157,12 @@ void uiInit(void) { nodelay(ui.input, true); ui.view = viewTag(TAG_STATUS); -} -void uiHide(void) { - ui.hide = true; - endwin(); + uiShow(); } void uiExit(void) { uiHide(); - termMode(TERM_FOCUS, false); printf( "This program is AGPLv3 free software!\n" "The source is available at <" SOURCE_URL ">.\n" @@ -461,7 +467,7 @@ static bool keyCode(wchar_t ch) { } void uiRead(void) { - ui.hide = false; + uiShow(); bool update = false; int ret; -- cgit 1.4.1 10951eb05e5b85628a0fc&follow=1'>diff
path: root/bin/1sh/var.h (unfollow)
Commit message (Collapse)Author
2020-09-11Rewrite install script yet againJune McEnroe
2020-09-11Remove NetBSD from install scriptJune McEnroe
I never use it.
2020-09-11Use MacPorts rather than pkgsrcJune McEnroe
My system is probably such a mess now...
2020-09-11Add debian VM name to sshJune McEnroe
2020-09-11Add influencer tweetJune McEnroe
2020-09-10Add The Kingdom of GodsJune McEnroe
Reading has really slowed down :(
2020-09-07Add SunglassesJune McEnroe
An IRC find.
2020-09-06Add Between the BreathsJune McEnroe
One of those good songs from a soundtrack of a film that probably isn't? The summary sounds a lot more interesting than the title implies, at least.
2020-09-04Open /dev/tty in nudgeJune McEnroe
This makes it work even when it's run connected to a pipe, i.e. as the notify command of catgirl...
2020-09-04Add nudgeJune McEnroe
2020-09-03Build fbclock with -lzJune McEnroe
I guess this got lost somewhere, long ago...
2020-08-29Add tweets from retweetsJune McEnroe