diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2005-11-29 16:15:21 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2005-11-29 16:15:21 +0000 |
commit | 4f1e90f68f78012b8be893cbf3d7c12ae9cf24b5 (patch) | |
tree | c8628a74b1349bd3d398b1fead06de407d0bfa81 /src/gui/curses | |
parent | 6efb8e44396e4158e23077783bc30b6319bf7ec0 (diff) | |
download | weechat-4f1e90f68f78012b8be893cbf3d7c12ae9cf24b5.zip |
Fixed display bug
Diffstat (limited to 'src/gui/curses')
-rw-r--r-- | src/gui/curses/gui-display.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/gui/curses/gui-display.c b/src/gui/curses/gui-display.c index fe077972c..4f8ece500 100644 --- a/src/gui/curses/gui-display.c +++ b/src/gui/curses/gui-display.c @@ -1231,7 +1231,6 @@ gui_display_line (t_gui_window *window, t_gui_line *line, int count, int simulat int read_marker_x, read_marker_y; int word_start_offset, word_end_offset; int word_length_with_spaces, word_length; - int skip_spaces; char *ptr_data, *ptr_end_offset, *next_char, *prev_char; char *ptr_style, saved_char; @@ -1273,7 +1272,6 @@ gui_display_line (t_gui_window *window, t_gui_line *line, int count, int simulat ptr_data = line->data; while (ptr_data && ptr_data[0]) { - skip_spaces = 0; gui_get_word_info (window, ptr_data, &word_start_offset, @@ -1284,9 +1282,9 @@ 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 */ + /* spaces + word too long for current line but ok for next line */ if ((window->win_chat_cursor_x + word_length_with_spaces > window->win_chat_width) - && (word_length < window->win_chat_width - line->length_align)) + && (word_length <= window->win_chat_width - line->length_align)) { gui_display_new_line (window, num_lines, count, &lines_displayed, simulate); @@ -1306,11 +1304,6 @@ gui_display_line (t_gui_window *window, t_gui_line *line, int count, int simulat ptr_data += word_start_offset; } - /* 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 */ gui_display_word (window, line, ptr_data, ptr_end_offset, @@ -1325,8 +1318,7 @@ gui_display_line (t_gui_window *window, t_gui_line *line, int count, int simulat if (*(ptr_data - 1) == '\0') ptr_data = NULL; - /* skip leading spaces? */ - if (skip_spaces) + if (window->win_chat_cursor_x == 0) { while (ptr_data && (ptr_data[0] == ' ')) { |