mirror of
https://github.com/weechat/weechat.git
synced 2026-06-29 14:26:39 +02:00
Fix other bugs with prefix alignment
This commit is contained in:
@@ -500,8 +500,8 @@ gui_chat_display_word (struct t_gui_window *window,
|
||||
|
||||
if (end_offset && end_offset[0])
|
||||
{
|
||||
saved_char_end = end_offset[1];
|
||||
end_offset[1] = '\0';
|
||||
saved_char_end = end_offset[0];
|
||||
end_offset[0] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -597,7 +597,7 @@ gui_chat_display_word (struct t_gui_window *window,
|
||||
}
|
||||
|
||||
if (end_offset)
|
||||
end_offset[1] = saved_char_end;
|
||||
end_offset[0] = saved_char_end;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -676,7 +676,7 @@ gui_chat_display_time_and_prefix (struct t_gui_window *window,
|
||||
(prefix_highlighted) ? prefix_highlighted : line->prefix,
|
||||
line->prefix +
|
||||
gui_chat_string_real_pos (line->prefix,
|
||||
length_allowed - 1),
|
||||
length_allowed),
|
||||
1, num_lines, count, lines_displayed,
|
||||
simulate);
|
||||
}
|
||||
@@ -863,7 +863,7 @@ gui_chat_display_line (struct t_gui_window *window, struct t_gui_line *line,
|
||||
|
||||
/* display word */
|
||||
gui_chat_display_word (window, line, ptr_data,
|
||||
ptr_end_offset,
|
||||
ptr_end_offset + 1,
|
||||
0, num_lines, count, &lines_displayed,
|
||||
simulate);
|
||||
|
||||
|
||||
+2
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user