From d57e7868760e9962a4973a4b64f88dfe3cf4e363 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Tue, 4 Feb 2020 04:09:54 -0500 Subject: Factor out unmark --- ui.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/ui.c b/ui.c index d69e706..6a834cd 100644 --- a/ui.c +++ b/ui.c @@ -362,16 +362,20 @@ static void statusUpdate(void) { putp(from_status_line); } +static void unmark(void) { + windows.active->heat = Cold; + windows.active->unread = 0; + windows.active->mark = false; + statusUpdate(); +} + void uiShowID(size_t id) { - windows.active->mark = true; struct Window *window = windowFor(id); - window->heat = Cold; - window->unread = 0; - window->mark = false; + touchwin(window->pad); windows.other = windows.active; windows.active = window; - touchwin(window->pad); - statusUpdate(); + windows.other->mark = true; + unmark(); } void uiWrite(size_t id, enum Heat heat, const time_t *time, const char *str) { @@ -403,7 +407,7 @@ void uiFormat( static void keyCode(int code) { switch (code) { break; case KEY_RESIZE:; // TODO - break; case KeyFocusIn:; // TODO + break; case KeyFocusIn: unmark(); break; case KeyFocusOut: windows.active->mark = true; break; case KeyPasteOn:; // TODO break; case KeyPasteOff:; // TODO -- cgit 1.4.1 /diff/bin/README.7?id=a7f6922bdfef88d9ea3363a48745bbb4c4644f89&follow=1'>diff
path: root/bin/README.7 (unfollow)
Commit message (Expand)Author
2020-04-04Include <content src> in feedJune McEnroe
2020-04-04Set publish date in feed from .DdJune McEnroe
2020-04-01Update cgit setup post with git-http-backendJune McEnroe