diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-06-16 12:47:10 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-06-16 12:47:10 +0200 |
commit | 860842240b2c3f673a2265716359cb6605048386 (patch) | |
tree | 1bd90d88df0b5afcc13a152bc40f6e038a6e7d63 /src/gui | |
parent | e69772b93d80b40bc379b863f6fa4783f0474f28 (diff) | |
download | weechat-860842240b2c3f673a2265716359cb6605048386.zip |
Remove space before vertical bar (after prefix), if there's no prefix at all in buffer
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/curses/gui-curses-chat.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/gui/curses/gui-curses-chat.c b/src/gui/curses/gui-curses-chat.c index c4d1be26d..6e966ab3a 100644 --- a/src/gui/curses/gui-curses-chat.c +++ b/src/gui/curses/gui-curses-chat.c @@ -617,8 +617,10 @@ gui_chat_display_time_and_prefix (struct t_gui_window *window, { prefix_highlighted = (char *)gui_color_decode ((unsigned char *)line->prefix); if (!simulate) + { gui_window_set_weechat_color (GUI_CURSES(window)->win_chat, GUI_COLOR_CHAT_HIGHLIGHT); + } } /* not enough space to display full prefix ? => truncate it! */ @@ -660,25 +662,32 @@ gui_chat_display_time_and_prefix (struct t_gui_window *window, && (num_spaces < 0)) { if (!simulate) + { gui_window_set_weechat_color (GUI_CURSES(window)->win_chat, GUI_COLOR_CHAT_PREFIX_MORE); + } gui_chat_display_word (window, line, str_plus, NULL, 1, num_lines, count, lines_displayed, simulate); } else { - gui_chat_display_word (window, line, str_space, - NULL, 1, num_lines, count, lines_displayed, - simulate); + if (window->buffer->prefix_max_length > 0) + { + gui_chat_display_word (window, line, str_space, + NULL, 1, num_lines, count, lines_displayed, + simulate); + } } if ((CONFIG_INTEGER(config_look_prefix_align) != CONFIG_LOOK_PREFIX_ALIGN_NONE) && (CONFIG_STRING(config_look_prefix_suffix) && CONFIG_STRING(config_look_prefix_suffix)[0])) { if (!simulate) + { gui_window_set_weechat_color (GUI_CURSES(window)->win_chat, GUI_COLOR_CHAT_PREFIX_SUFFIX); + } gui_chat_display_word (window, line, CONFIG_STRING(config_look_prefix_suffix), NULL, 1, num_lines, count, |