about summary refs log tree commit diff stats
path: root/src/command/commands.c
diff options
context:
space:
mode:
authorPete <pgm987@gmail.com>2015-06-01 11:27:01 +0100
committerPete <pgm987@gmail.com>2015-06-01 11:27:01 +0100
commit0564976264f532b48050656b12dc2d4a3c15d8c3 (patch)
tree8c15ddf6c0fd13b6af49f726100c7b8ba7227994 /src/command/commands.c
parent9c659246bc600b03eb28b1b970f9f0f97b5f81af (diff)
downloadprofani-tty-0564976264f532b48050656b12dc2d4a3c15d8c3.tar.gz
Refactored 'ui_tidy_wins()' to return bool and not output text, Corrected underline, removed call to function 'wins_resize_all()'.
Diffstat (limited to 'src/command/commands.c')
-rw-r--r--src/command/commands.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/command/commands.c b/src/command/commands.c
index 89ded432..86781330 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -689,7 +689,11 @@ cmd_wins(gchar **args, struct cmd_help_t help)
     if (args[0] == NULL) {
         cons_show_wins();
     } else if (strcmp(args[0], "tidy") == 0) {
-        ui_tidy_wins();
+        if ( ui_tidy_wins() ) {
+            cons_show("Windows tidied.");
+        } else {
+            cons_show("No tidy needed.");
+        }
     } else if (strcmp(args[0], "prune") == 0) {
         ui_prune_wins();
     } else if (strcmp(args[0], "swap") == 0) {
@@ -723,8 +727,6 @@ cmd_winstidy(gchar **args, struct cmd_help_t help)
 {
     gboolean result = _cmd_set_boolean_preference(args[0], help, "Wins Auto Tidy", PREF_WINS_AUTO_TIDY);
 
-    wins_resize_all();
-
     return result;
 }
 
@@ -3254,6 +3256,7 @@ cmd_close(gchar **args, struct cmd_help_t help)
 
     // Tidy up the window list.
     if (prefs_get_boolean(PREF_WINS_AUTO_TIDY)) {
+        // TODO: Any benefit of checking the return value?
         ui_tidy_wins();
     }