summaryrefslogtreecommitdiff
path: root/src/gui/gui-chat.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2008-07-06 10:52:58 +0200
committerSebastien Helleu <flashcode@flashtux.org>2008-07-06 10:52:58 +0200
commit28088484df5c0cebeb0b4c8887e12bb9c619bf33 (patch)
tree3f4bb1d2534145af0b565e9632b42b09a800877d /src/gui/gui-chat.c
parentc32f244ffff26f405d76960b656c44ec493e5d4b (diff)
downloadweechat-28088484df5c0cebeb0b4c8887e12bb9c619bf33.zip
Fix other bugs with prefix alignment
Diffstat (limited to 'src/gui/gui-chat.c')
-rw-r--r--src/gui/gui-chat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/gui-chat.c b/src/gui/gui-chat.c
index cfbee356f..3d4bfd5ba 100644
--- a/src/gui/gui-chat.c
+++ b/src/gui/gui-chat.c
@@ -388,7 +388,8 @@ gui_chat_get_line_align (struct t_gui_buffer *buffer, struct t_gui_line *line,
length_suffix = gui_chat_strlen_screen (CONFIG_STRING(config_look_prefix_suffix)) + 1;
}
return gui_chat_time_length + ((buffer->prefix_max_length > 0) ? 1 : 0) +
- + ((buffer->prefix_max_length > CONFIG_INTEGER(config_look_prefix_align_max)) ?
+ + (((CONFIG_INTEGER(config_look_prefix_align_max) > 0)
+ && (buffer->prefix_max_length > CONFIG_INTEGER(config_look_prefix_align_max))) ?
CONFIG_INTEGER(config_look_prefix_align_max) : buffer->prefix_max_length)
+ length_suffix + 1;
}