summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7e143ef)
raw | patch | inline | side by side (parent: 7e143ef)
author | Max Kellermann <max@duempel.org> | |
Thu, 19 Nov 2009 20:08:33 +0000 (21:08 +0100) | ||
committer | Max Kellermann <max@duempel.org> | |
Thu, 19 Nov 2009 20:08:33 +0000 (21:08 +0100) |
Consider zero-length characters in utf8_width().
NEWS | patch | blob | history | |
src/charset.c | patch | blob | history |
index f5ff89273899f03de142d8db311525793e83ba66..c79ec7656b56e91aacd002fb73f479e0665c336a 100644 (file)
--- a/NEWS
+++ b/NEWS
* screen_queue: move ranges with one single "move" command
* status_bar: fix display_remaining_time while seeking
* status_bar: display elapsed time event when total time is unknown
+* charset: added support for zero-width characters
ncmpc 0.15 - 2009-09-24
diff --git a/src/charset.c b/src/charset.c
index 440084406d2f5837d239a356da48b5f068294a9f..01d381b5d1303d0301360a7fafc919ac1dc701db 100644 (file)
--- a/src/charset.c
+++ b/src/charset.c
static inline unsigned
unicode_char_width(gunichar ch)
{
+#if !GLIB_CHECK_VERSION(2,14,0)
+ if (g_unichar_iszerowidth(ch))
+ return 0;
+#endif
+
if (g_unichar_iswide(ch))
return 2;