about summary refs log tree commit diff stats
path: root/src/ui/windows.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/windows.c')
-rw-r--r--src/ui/windows.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ui/windows.c b/src/ui/windows.c
index 269bea1d..4cc0fef7 100644
--- a/src/ui/windows.c
+++ b/src/ui/windows.c
@@ -644,6 +644,7 @@ gboolean
 wins_swap(int source_win, int target_win)
 {
     ProfWin *source = g_hash_table_lookup(windows, GINT_TO_POINTER(source_win));
+    ProfWin *console = wins_get_console();
 
     if (source) {
         ProfWin *target = g_hash_table_lookup(windows, GINT_TO_POINTER(target_win));
@@ -660,7 +661,7 @@ wins_swap(int source_win, int target_win)
             }
             if (wins_get_current_num() == source_win) {
                 wins_set_current_by_num(target_win);
-                ui_switch_win_num(1);
+                ui_switch_win(console);
             }
             return TRUE;
 
@@ -681,7 +682,7 @@ wins_swap(int source_win, int target_win)
                 status_bar_active(source_win);
             }
             if ((wins_get_current_num() == source_win) || (wins_get_current_num() == target_win)) {
-                ui_switch_win_num(1);
+                ui_switch_win(console);
             }
             return TRUE;
         }
@@ -740,7 +741,8 @@ wins_tidy(void)
 
         windows = new_windows;
         current = 1;
-        ui_switch_win_num(1);
+        ProfWin *console = wins_get_console();
+        ui_switch_win(console);
         g_list_free(keys);
         return TRUE;
     } else {