summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2018-06-30 00:55:35 -0600
committerEduardo Chappa <chappa@washington.edu>2018-06-30 00:55:35 -0600
commit7dbd93a3d471ff402f919d31aa4e86bdb9d6e5aa (patch)
treef0e2f060e47f7d1bc739cd2813ed5b0f75ea31ea
parent5d1f76edbfa357181f1a8662aa990c8b3e89f775 (diff)
downloadalpine-7dbd93a3d471ff402f919d31aa4e86bdb9d6e5aa.tar.xz
* Width of characters is not always determined correctly when wcwidth
is used. The revert to using code for the Windows operating system. Reported by Andrew Ho.
-rw-r--r--pith/charconv/utf8.c5
-rw-r--r--pith/pine.hlp2
2 files changed, 5 insertions, 2 deletions
diff --git a/pith/charconv/utf8.c b/pith/charconv/utf8.c
index 373f4b62..6613f4db 100644
--- a/pith/charconv/utf8.c
+++ b/pith/charconv/utf8.c
@@ -100,10 +100,13 @@ wcellwidth(UCS ucs)
#endif
}
-/* ambiguous width zone character function */
+/* ambiguous width zone character function. We use the Windows code until
+ * we find a better way to do it in general.
+ */
int
pith_ucs4width(UCS ucs)
{
+ return (ucs >= 0x2100) ? 2 : 1;
#if !defined(_WINDOWS) && HAVE_WCWIDTH
return wcwidth((wchar_t) ucs);
#else
diff --git a/pith/pine.hlp b/pith/pine.hlp
index 9b461884..b791e16d 100644
--- a/pith/pine.hlp
+++ b/pith/pine.hlp
@@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any
reasonable place to be called from.
Dummy change to get revision in pine.hlp
============= h_revision =================
-Alpine Commit 292 2018-06-27 11:54:08
+Alpine Commit 293 2018-06-30 00:52:53
============= h_news =================
<HTML>
<HEAD>