[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 |
URL:
<http://savannah.nongnu.org/patch/?8253>
Summary: fix highlighted position in string with full-width
chars
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:
_______________________________________________________
Details:
Hi,
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,
0001-fix-highlighted-position-in-string-with-full-width-c.patch).
Regards,
AYANOKOUZI, Ryuunosuke
--
AYANOKOUZI, Ryuunosuke <address@hidden>
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: 2013年12月11日 09時17分36秒 Name: testcase.png Size: 51kB By:
ayanokouzi
<http://savannah.nongnu.org/patch/download.php?file_id=29859>
-------------------------------------------------------
Date: 2013年12月11日 09時17分36秒 Name:
0001-fix-highlighted-position-in-string-with-full-width-c.patch Size: 4kB
By: ayanokouzi
<http://savannah.nongnu.org/patch/download.php?file_id=29860>
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?8253>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [Weechat-dev] [patch #8253] fix highlighted position in string with full-width chars,
AYANOKOUZI, Ryuunosuke <=