[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Weechat-dev] [patch #8253] fix highlighted position in string with full

From: AYANOKOUZI, Ryuunosuke
Subject: [Weechat-dev] [patch #8253] fix highlighted position in string with full-width chars
Date: Wed, 11 Dec 2013 09:17:37 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36


                 Summary: fix highlighted position in string with full-width
                 Project: WeeChat
            Submitted by: ayanokouzi
            Submitted on: 2013年12月11日 09時17分36秒
                Category: display
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                IRC nick: 




When highlighting a word in string containing full-width chars ahead
of the search word, wrong position is highlighted.

This is a patch for this bug.

This bug is caused by position counting error in
"gui_chat_string_real_pos" function.  According to the source of
"gui_color_emphasize" function, argument "pos" for function
"gui_chat_string_real_pos" is expected to be a number of UTF-8 chars,
but inside "gui_chat_string_real_pos" function, argument "pos" is
treated as the width of string on screen. So, if argument "string"
doesn't contain full-width chars, it's always fine. But if there is
full-width char ahead of search word, wrong position is highlighted.

Please find attached files (testcase.png,

AYANOKOUZI, Ryuunosuke
AYANOKOUZI, Ryuunosuke <address@hidden>


File Attachments:

Date: 2013年12月11日 09時17分36秒  Name: testcase.png  Size: 51kB   By:

Date: 2013年12月11日 09時17分36秒  Name:
0001-fix-highlighted-position-in-string-with-full-width-c.patch  Size: 4kB  
By: ayanokouzi



Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]