about summary refs log tree commit diff stats
path: root/src/command/commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/command/commands.c')
-rw-r--r--src/command/commands.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/command/commands.c b/src/command/commands.c
index 15676184..0ed51795 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -530,12 +530,10 @@ gboolean
 cmd_win(gchar **args, struct cmd_help_t help)
 {
     int num = atoi(args[0]);
-    if (ui_win_exists(num)) {
-        ui_switch_win(num);
-    } else {
+    gboolean switched = ui_switch_win(num);
+    if (switched == FALSE) {
         cons_show("Window %d does not exist.", num);
     }
-
     return TRUE;
 }