about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-04-21 01:42:57 +0100
committerJames Booth <boothj5@gmail.com>2013-04-21 01:42:57 +0100
commit8a280b43cac0e84cede288a1816cd0ee2324782b (patch)
tree88d3240fda3e9661decea7279916057489364565
parent3011dc63ae573316ff5ac933f8511cc2a85fb15b (diff)
downloadprofani-tty-8a280b43cac0e84cede288a1816cd0ee2324782b.tar.gz
Moved cons_bad_command() to console module
-rw-r--r--src/ui/console.c12
-rw-r--r--src/ui/windows.c13
2 files changed, 12 insertions, 13 deletions
diff --git a/src/ui/console.c b/src/ui/console.c
index 9600f79f..0bea782d 100644
--- a/src/ui/console.c
+++ b/src/ui/console.c
@@ -141,6 +141,18 @@ cons_bad_show(const char * const msg, ...)
 }
 
 void
+cons_bad_command(const char * const cmd)
+{
+    window_show_time(console, '-');
+    wprintw(console->win, "Unknown command: %s\n", cmd);
+
+    dirty = TRUE;
+    if (!win_current_is_console()) {
+        status_bar_new(0);
+    }
+}
+
+void
 cons_about(void)
 {
     int rows, cols;
diff --git a/src/ui/windows.c b/src/ui/windows.c
index be51a4e3..8d9f6b5d 100644
--- a/src/ui/windows.c
+++ b/src/ui/windows.c
@@ -1146,19 +1146,6 @@ win_room_show_status(const char * const contact)
 }
 
 void
-cons_bad_command(const char * const cmd)
-{
-    window_show_time(console, '-');
-    wprintw(console->win, "Unknown command: %s\n", cmd);
-
-    if (current_index == 0) {
-        dirty = TRUE;
-    } else {
-        status_bar_new(0);
-    }
-}
-
-void
 notify_remind(void)
 {
     gint unread = _win_get_unread();