From 512de497f56e92945b5f29ad6b6f9f40287e1d2b Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sun, 9 Jan 2011 12:43:10 +0100 Subject: Display more colors on each line for WeeChat basic and nick colors on /color buffer --- src/gui/curses/gui-curses-color.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/gui/curses/gui-curses-color.c b/src/gui/curses/gui-curses-color.c index d728be768..22e265d9e 100644 --- a/src/gui/curses/gui-curses-color.c +++ b/src/gui/curses/gui-curses-color.c @@ -652,13 +652,13 @@ gui_color_buffer_display () i, gui_weechat_colors[i].string); } - strcat (str_line, str_color); - if (((i + 1) % 8) == 0) + if (gui_chat_strlen_screen (str_line) + gui_chat_strlen_screen (str_color) > 80) { gui_chat_printf_y (gui_color_buffer, y++, " %s", str_line); str_line[0] = '\0'; } + strcat (str_line, str_color); } if (str_line[0]) { @@ -690,13 +690,13 @@ gui_color_buffer_display () gui_color_get_custom (items[i]), items[i]); } - strcat (str_line, str_color); - if (((i + 1) % 8) == 0) + if (gui_chat_strlen_screen (str_line) + gui_chat_strlen_screen (str_color) > 80) { gui_chat_printf_y (gui_color_buffer, y++, " %s", str_line); str_line[0] = '\0'; } + strcat (str_line, str_color); } if (str_line[0]) { -- cgit v1.2.3