summaryrefslogtreecommitdiff
path: root/src/gui/gui-chat.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2008-07-06 10:02:26 +0200
committerSebastien Helleu <flashcode@flashtux.org>2008-07-06 10:02:26 +0200
commitc32f244ffff26f405d76960b656c44ec493e5d4b (patch)
tree74913c0fa2a86e3d6f933001b9ce62dd5f3333af /src/gui/gui-chat.c
parent1f787ddcbaf7ebcdc90994fb8413f6afdd98b456 (diff)
downloadweechat-c32f244ffff26f405d76960b656c44ec493e5d4b.zip
Fix display bug with prefix_align_max option (bug #23777)
Diffstat (limited to 'src/gui/gui-chat.c')
-rw-r--r--src/gui/gui-chat.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gui/gui-chat.c b/src/gui/gui-chat.c
index 3ac626afb..cfbee356f 100644
--- a/src/gui/gui-chat.c
+++ b/src/gui/gui-chat.c
@@ -387,12 +387,10 @@ gui_chat_get_line_align (struct t_gui_buffer *buffer, struct t_gui_line *line,
&& CONFIG_STRING(config_look_prefix_suffix)[0])
length_suffix = gui_chat_strlen_screen (CONFIG_STRING(config_look_prefix_suffix)) + 1;
}
- if (CONFIG_INTEGER(config_look_prefix_align_max) > 0)
- return gui_chat_time_length + 1 + CONFIG_INTEGER(config_look_prefix_align_max) +
- length_suffix + 1;
- else
- return gui_chat_time_length + ((buffer->prefix_max_length > 0) ? 1 : 0) +
- + buffer->prefix_max_length + length_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) : buffer->prefix_max_length)
+ + length_suffix + 1;
}
/*