diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/gui/gui-chat.c | 6 |
2 files changed, 7 insertions, 2 deletions
@@ -1,12 +1,13 @@ WeeChat ChangeLog ================= Sébastien Helleu <flashcode@flashtux.org> -v0.3.8-dev, 2012-02-29 +v0.3.8-dev, 2012-03-03 Version 0.3.8 (under dev!) -------------------------- +* core: fix display of wide chars on last column of chat area (patch #7733) * irc: add support of "external" SASL mechanism (task #11864) * irc: close server buffer when server is deleted * irc: add search for lower case nicks in option irc.look.nick_color_force diff --git a/src/gui/gui-chat.c b/src/gui/gui-chat.c index f337fc0e2..64272a957 100644 --- a/src/gui/gui-chat.c +++ b/src/gui/gui-chat.c @@ -233,13 +233,14 @@ gui_chat_string_add_offset_screen (const char *string, int offset_screen) int gui_chat_string_real_pos (const char *string, int pos) { - const char *real_pos, *ptr_string; + const char *real_pos, *real_pos_prev, *ptr_string; int size_on_screen; if (pos <= 0) return 0; real_pos = string; + real_pos_prev = string; ptr_string = string; while (ptr_string && ptr_string[0] && (pos > 0)) { @@ -252,9 +253,12 @@ gui_chat_string_real_pos (const char *string, int pos) if (size_on_screen > 0) pos -= size_on_screen; ptr_string = utf8_next_char (ptr_string); + real_pos_prev = real_pos; real_pos = ptr_string; } } + if (pos < 0) + real_pos = real_pos_prev; return 0 + (real_pos - string); } |