diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2005-11-26 13:45:32 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2005-11-26 13:45:32 +0000 |
commit | a477f29cf852166d9ad26485406ed7036040d9ff (patch) | |
tree | 78628ff2e0b4ca797e0933aad5038c7f1bc61187 | |
parent | ea3d7c278d6fb7b37554f86e733ee336733fc6ea (diff) | |
download | weechat-a477f29cf852166d9ad26485406ed7036040d9ff.zip |
Fixed display bug in chat window when a message length equals to window width
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/gui/curses/gui-display.c | 8 | ||||
-rw-r--r-- | weechat/ChangeLog | 4 | ||||
-rw-r--r-- | weechat/src/gui/curses/gui-display.c | 8 |
4 files changed, 14 insertions, 10 deletions
@@ -1,10 +1,12 @@ WeeChat - Wee Enhanced Environment for Chat =========================================== -ChangeLog - 2005-11-22 +ChangeLog - 2005-11-26 Version 0.1.7 (under dev!): + * fixed display bug in chat window when a message length equals to window + width * added new keys for switching to other windows: alt-w followed by alt-{arrow} * added new keys for scrolling to previous/next highlight: alt-P / alt-N diff --git a/src/gui/curses/gui-display.c b/src/gui/curses/gui-display.c index 4c643240f..6948981a4 100644 --- a/src/gui/curses/gui-display.c +++ b/src/gui/curses/gui-display.c @@ -1285,8 +1285,7 @@ gui_display_line (t_gui_window *window, t_gui_line *line, int count, int simulat if (word_length > 0) { /* spaces + word too long for current line */ - if ((window->win_chat_cursor_x + word_length_with_spaces > window->win_chat_width - 1) - && (word_length < window->win_chat_width - line->length_align)) + if (window->win_chat_cursor_x + word_length_with_spaces > window->win_chat_width) { gui_display_new_line (window, num_lines, count, &lines_displayed, simulate); @@ -1306,8 +1305,9 @@ gui_display_line (t_gui_window *window, t_gui_line *line, int count, int simulat ptr_data += word_start_offset; } - /* word is exactly width => we'll skip next leading spaces for next line */ - if (word_length == window->win_chat_width - line->length_align) + /* word is exactly remaining width => we'll skip next leading spaces for next line */ + if (word_length == window->win_chat_width - + ((window->win_chat_cursor_x == 0) ? line->length_align : window->win_chat_cursor_x)) skip_spaces = 1; /* display word */ diff --git a/weechat/ChangeLog b/weechat/ChangeLog index 4d7de8416..1a2bc09c2 100644 --- a/weechat/ChangeLog +++ b/weechat/ChangeLog @@ -1,10 +1,12 @@ WeeChat - Wee Enhanced Environment for Chat =========================================== -ChangeLog - 2005-11-22 +ChangeLog - 2005-11-26 Version 0.1.7 (under dev!): + * fixed display bug in chat window when a message length equals to window + width * added new keys for switching to other windows: alt-w followed by alt-{arrow} * added new keys for scrolling to previous/next highlight: alt-P / alt-N diff --git a/weechat/src/gui/curses/gui-display.c b/weechat/src/gui/curses/gui-display.c index 4c643240f..6948981a4 100644 --- a/weechat/src/gui/curses/gui-display.c +++ b/weechat/src/gui/curses/gui-display.c @@ -1285,8 +1285,7 @@ gui_display_line (t_gui_window *window, t_gui_line *line, int count, int simulat if (word_length > 0) { /* spaces + word too long for current line */ - if ((window->win_chat_cursor_x + word_length_with_spaces > window->win_chat_width - 1) - && (word_length < window->win_chat_width - line->length_align)) + if (window->win_chat_cursor_x + word_length_with_spaces > window->win_chat_width) { gui_display_new_line (window, num_lines, count, &lines_displayed, simulate); @@ -1306,8 +1305,9 @@ gui_display_line (t_gui_window *window, t_gui_line *line, int count, int simulat ptr_data += word_start_offset; } - /* word is exactly width => we'll skip next leading spaces for next line */ - if (word_length == window->win_chat_width - line->length_align) + /* word is exactly remaining width => we'll skip next leading spaces for next line */ + if (word_length == window->win_chat_width - + ((window->win_chat_cursor_x == 0) ? line->length_align : window->win_chat_cursor_x)) skip_spaces = 1; /* display word */ |