diff options
author | C. McEnroe | 2020-02-12 19:40:55 -0500 |
---|---|---|
committer | C. McEnroe | 2020-02-12 19:40:55 -0500 |
commit | 4198f67aa2149088cd49ad43f09a53b5c3276846 (patch) | |
tree | a890a491b71582e890d09e3464d6c9a577989095 /ui.c | |
parent | 7285906298bc6281e7c7ee07d353544fc8e011d2 (diff) |
Mark and unmark on uiHide, uiShow
Diffstat (limited to 'ui.c')
-rw-r--r-- | ui.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/ui.c b/ui.c index b91cb3d..97f81b3 100644 --- a/ui.c +++ b/ui.c @@ -300,21 +300,6 @@ void uiDraw(void) { fflush(stdout); } -void uiShow(void) { - prevTitle[0] = '\0'; - putp(EnterFocusMode); - putp(EnterPasteMode); - fflush(stdout); - hidden = false; -} - -void uiHide(void) { - hidden = true; - putp(ExitFocusMode); - putp(ExitPasteMode); - endwin(); -} - struct Style { attr_t attr; enum Color fg, bg; @@ -450,6 +435,23 @@ static void unmark(struct Window *window) { statusUpdate(); } +void uiShow(void) { + prevTitle[0] = '\0'; + putp(EnterFocusMode); + putp(EnterPasteMode); + fflush(stdout); + hidden = false; + unmark(windows.active); +} + +void uiHide(void) { + mark(windows.active); + hidden = true; + putp(ExitFocusMode); + putp(ExitPasteMode); + endwin(); +} + static void windowScroll(struct Window *window, int n) { mark(window); window->scroll += n; |