From ba92074bf825224410f95a47fdfe0caaca3f1d58 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Mon, 7 Feb 2011 14:34:23 +0100 Subject: [PATCH] Fix missing suffix (after prefix) on lines when nothing is displayed before suffix (no time/buffer/prefix) --- src/gui/curses/gui-curses-chat.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gui/curses/gui-curses-chat.c b/src/gui/curses/gui-curses-chat.c index a7e8877f7..953a21825 100644 --- a/src/gui/curses/gui-curses-chat.c +++ b/src/gui/curses/gui-curses-chat.c @@ -579,8 +579,7 @@ gui_chat_display_word (struct t_gui_window *window, { /* insert spaces for aligning text under time/nick */ length_align = gui_line_get_align (window->buffer, line, 0, 0); - if ((length_align > 0) - && (window->win_chat_cursor_x == 0) + if ((window->win_chat_cursor_x == 0) && (*lines_displayed > 0) /* FIXME: modify arbitraty value for non aligning messages on time/nick? */ && (length_align < (window->win_chat_width - 5))) @@ -595,8 +594,8 @@ gui_chat_display_word (struct t_gui_window *window, window->win_chat_cursor_x += length_align; if ((CONFIG_INTEGER(config_look_align_end_of_lines) == CONFIG_LOOK_ALIGN_END_OF_LINES_MESSAGE) && (CONFIG_INTEGER(config_look_prefix_align) != CONFIG_LOOK_PREFIX_ALIGN_NONE) - && (CONFIG_STRING(config_look_prefix_suffix) - && CONFIG_STRING(config_look_prefix_suffix)[0])) + && CONFIG_STRING(config_look_prefix_suffix) + && CONFIG_STRING(config_look_prefix_suffix)[0]) { if (!simulate) {