From 4ae817cd8292f964ef1c45bfa3b70544ce23043f Mon Sep 17 00:00:00 2001 From: James Booth Date: Fri, 30 Aug 2013 00:49:38 +0100 Subject: Fixed ">" indicator when tidying windows --- src/ui/core.c | 2 +- src/ui/statusbar.c | 14 ++++++++++++++ src/ui/ui.h | 1 + src/ui/windows.c | 5 +---- 4 files changed, 17 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/ui/core.c b/src/ui/core.c index d6e17854..2229d37c 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -621,8 +621,8 @@ void ui_close_current(void) { int current_index = wins_get_current_num(); - wins_close_current(); status_bar_inactive(current_index); + wins_close_current(); status_bar_active(1); title_bar_title(); } diff --git a/src/ui/statusbar.c b/src/ui/statusbar.c index e4d61811..e7456adc 100644 --- a/src/ui/statusbar.c +++ b/src/ui/statusbar.c @@ -129,6 +129,20 @@ status_bar_resize(void) dirty = TRUE; } +void +status_bar_set_all_inactive(void) +{ + int i = 0; + for (i = 0; i < 12; i++) { + is_active[i] = FALSE; + is_new[i] = FALSE; + _mark_inactive(i); + } + + g_hash_table_remove_all(remaining_active); + g_hash_table_remove_all(remaining_new); +} + void status_bar_inactive(const int win) { diff --git a/src/ui/ui.h b/src/ui/ui.h index 157f8ad3..fa74bed6 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -225,6 +225,7 @@ void status_bar_inactive(const int win); void status_bar_active(const int win); void status_bar_new(const int win); void status_bar_update_time(void); +void status_bar_set_all_inactive(void); // input window actions wint_t inp_get_char(char *input, int *size); diff --git a/src/ui/windows.c b/src/ui/windows.c index 81a6d3e6..e956068c 100644 --- a/src/ui/windows.c +++ b/src/ui/windows.c @@ -332,10 +332,7 @@ wins_tidy(void) } if (tidy_required) { - int i = 0; - for (i = 0; i < 12; i++) { - status_bar_inactive(i); - } + status_bar_set_all_inactive(); GHashTable *new_windows = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, (GDestroyNotify)win_free); -- cgit 1.4.1-2-gfad0