From ebf8911ffc2fc10c66f3c72c2958119d1e41b4db Mon Sep 17 00:00:00 2001 From: James Booth Date: Tue, 27 Nov 2012 21:53:56 +0000 Subject: Implemented /sub show --- src/windows.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/windows.c') 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; } -- cgit 1.4.1-2-gfad0