[PATCH 7 of 8 py3] encoding: make wide character class list a sysstr
Augie Fackler
raf at durin42.com
Sun May 28 16:59:03 EDT 2017
# HG changeset patch
# User Augie Fackler <raf at durin42.com>
# Date 1495992449 14400
# Sun May 28 13:27:29 2017 -0400
# Node ID 99ca209bad39793fa60f226ffe35a88ef7b0d004
# Parent 2faf46402f149abebd3e47f854185dc2d83f53b9
encoding: make wide character class list a sysstr
That's what east_asian_width returns, so just match it.
diff --git a/mercurial/encoding.py b/mercurial/encoding.py
--- a/mercurial/encoding.py
+++ b/mercurial/encoding.py
@@ -194,8 +194,8 @@ if not _nativeenviron:
for k, v in os.environ.items()) # re-exports
# How to treat ambiguous-width characters. Set to 'wide' to treat as wide.
-wide = (environ.get("HGENCODINGAMBIGUOUS", "narrow") == "wide"
- and "WFA" or "WF")
+wide = _sysstr(environ.get("HGENCODINGAMBIGUOUS", "narrow") == "wide"
+ and "WFA" or "WF")
def colwidth(s):
"Find the column width of a string for display in the local encoding"
More information about the Mercurial-devel
mailing list