mirror of
https://github.com/weechat/weechat.git
synced 2026-06-27 13:26:38 +02:00
core: display spaces at the end of messages in chat area (bug #37024)
This commit is contained in:
@@ -7,6 +7,7 @@ v0.3.9-dev, 2012-08-22
|
||||
Version 0.3.9 (under dev!)
|
||||
--------------------------
|
||||
|
||||
* core: display spaces at the end of messages in chat area (bug #37024)
|
||||
* core: fix infinite loop in display when chat area has width of 1 with
|
||||
a bar displayed on the right (nicklist by default) (bug #37089)
|
||||
* core: fix display of "bar more down" char when text is truncated by size_max
|
||||
|
||||
@@ -1119,15 +1119,22 @@ gui_chat_display_line (struct t_gui_window *window, struct t_gui_line *line,
|
||||
|
||||
ptr_end_offset = ptr_data + word_end_offset;
|
||||
|
||||
/* if message ends with spaces, display them */
|
||||
if ((word_length == 0) && (word_length_with_spaces > 0)
|
||||
&& !ptr_data[word_end_offset + 1])
|
||||
{
|
||||
word_length = word_length_with_spaces;
|
||||
}
|
||||
|
||||
if (word_length > 0)
|
||||
{
|
||||
/* spaces + word too long for current line but ok for next line */
|
||||
line_align = gui_line_get_align (window->buffer, line, 1,
|
||||
(lines_displayed == 0) ? 1 : 0,
|
||||
GUI_WINDOW_OBJECTS(window)->force_prefix_for_line);
|
||||
if ((window->win_chat_cursor_x + word_length_with_spaces > gui_chat_get_real_width (window))
|
||||
&& (word_length <= gui_chat_get_real_width (window) - line_align))
|
||||
{
|
||||
/* spaces + word too long for current line but ok for next line */
|
||||
gui_chat_display_new_line (window, num_lines, count,
|
||||
&lines_displayed, simulate);
|
||||
/* apply styles before jumping to start of word */
|
||||
|
||||
@@ -306,7 +306,10 @@ gui_chat_get_word_info (struct t_gui_window *window,
|
||||
else
|
||||
{
|
||||
if (leading_spaces)
|
||||
{
|
||||
(*word_length_with_spaces)++;
|
||||
*word_end_offset = next_char2 - start_data - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
*word_end_offset = next_char - start_data - 1;
|
||||
|
||||
Reference in New Issue
Block a user