diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2007-09-02 15:34:29 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2007-09-02 15:34:29 +0000 |
commit | 68fd7737302cc21d38a326eefcb000daecfb1ba4 (patch) | |
tree | bd145190bf7bc7e53411c09e9e12950d88e4147f /src/gui | |
parent | dd0b1701e3613cf869d7fa72217707afe3dbe7c8 (diff) | |
download | weechat-68fd7737302cc21d38a326eefcb000daecfb1ba4.zip |
Fixed display bug with some special chars in messages (some words were truncated on screen) (bug #20944)
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/curses/gui-curses-chat.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/curses/gui-curses-chat.c b/src/gui/curses/gui-curses-chat.c index 9de15b09a..4bfeadb36 100644 --- a/src/gui/curses/gui-curses-chat.c +++ b/src/gui/curses/gui-curses-chat.c @@ -457,6 +457,8 @@ gui_chat_word_get_next_char (t_gui_window *window, unsigned char *string, memcpy (utf_char, string, char_size); utf_char[char_size] = '\0'; *width_screen = utf8_width_screen (utf_char); + if (*width_screen < 0) + *width_screen = char_size; } return (char *)string + char_size; } @@ -494,7 +496,9 @@ gui_chat_display_word_raw (t_gui_window *window, char *string, int display) { saved_char = next_char[0]; next_char[0] = '\0'; - if (((unsigned char)(prev_char[0]) == 146) && (!prev_char[1])) + if ((((unsigned char)(prev_char[0]) == 146) + || ((unsigned char)(prev_char[0]) == 0x7F)) + && (!prev_char[1])) wprintw (GUI_CURSES(window)->win_chat, "."); else { |