about summary refs log tree commit diff stats
path: root/src/windows.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2012-11-27 21:53:56 +0000
committerJames Booth <boothj5@gmail.com>2012-11-27 21:53:56 +0000
commitebf8911ffc2fc10c66f3c72c2958119d1e41b4db (patch)
tree861b6dfc0a21ea5ea95d2de9983837558096db71 /src/windows.c
parent4e78f8f14902e5ff496d9213afcee28b7e5d1f68 (diff)
downloadprofani-tty-ebf8911ffc2fc10c66f3c72c2958119d1e41b4db.tar.gz
Implemented /sub show
Diffstat (limited to 'src/windows.c')
-rw-r--r--src/windows.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/windows.c b/src/windows.c
index f75c0bb9..6efc9e19 100644
--- a/src/windows.c
+++ b/src/windows.c
@@ -488,11 +488,16 @@ win_current_get_recipient(void)
 }
 
 void
-win_current_show(const char * const msg)
+win_current_show(const char * const msg, ...)
 {
-    WINDOW *win = current->win;
-    _win_show_time(win);
-    wprintw(win, "%s\n", msg);
+    va_list arg;
+    va_start(arg, msg);
+    GString *fmt_msg = g_string_new(NULL);
+    g_string_vprintf(fmt_msg, msg, arg);
+    _win_show_time(current->win);
+    wprintw(current->win, "%s\n", fmt_msg->str);
+    g_string_free(fmt_msg, TRUE);
+    va_end(arg);
 
     dirty = TRUE;
 }