diff options
author | Michael Vetter <jubalh@iodoru.org> | 2020-07-10 13:46:06 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2020-07-10 13:46:06 +0200 |
commit | 10d771f3d1994cc450e96f25d45a3bbf297fb48f (patch) | |
tree | ab07025049b56f4e7acabde25764a49819bf899e /src/ui/window_list.c | |
parent | 63a71af8033c3297514e6721475b9bed797e8f97 (diff) | |
parent | d075c62fed977644f4c32572bda31820002241e2 (diff) | |
download | profani-tty-10d771f3d1994cc450e96f25d45a3bbf297fb48f.tar.gz |
Merge branch 'master' of github.com:profanity-im/profanity
Diffstat (limited to 'src/ui/window_list.c')
-rw-r--r-- | src/ui/window_list.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ui/window_list.c b/src/ui/window_list.c index bb59e64d..c9ae8ba9 100644 --- a/src/ui/window_list.c +++ b/src/ui/window_list.c @@ -357,6 +357,21 @@ wins_set_current_by_num(int i) ProfPrivateWin* privatewin = (ProfPrivateWin*)window; privatewin->unread = 0; } + + // if we switched to console + if (current == 0) { + // remove all alerts + cons_clear_alerts(); + } else { + // remove alert from window where we switch to + cons_remove_alert(window); + // if there a no more alerts left + if (!cons_has_alerts()) { + // dont highlight console (no news there) + ProfWin* conswin = wins_get_console(); + status_bar_active(1, conswin->type, "console"); + } + } } } |