##// END OF EJS Templates
i18n: calculate terminal columns by width information of each characters...
i18n: calculate terminal columns by width information of each characters neither number of 'bytes' in any encoding nor 'characters' is appropriate to calculate terminal columns for specified string. this patch modifies MBTextWrapper for: - overriding '_wrap_chunks()' to make it use not built-in 'len()' but 'encoding.colwidth()' for columns of string - fixing '_cutdown()' to make it use 'encoding.colwidth()' instead of local, similar but incorrect implementation this patch also modifies 'encoding.py': - dividing 'colwith()' into 2 pieces: one for calculation columns of specified UNICODE string, and another for rest part of original one. the former is used from MBTextWrapper in 'util.py'. - preventing 'colwidth()' from evaluating HGENCODINGAMBIGUOUS configuration per each invocation: 'unicodedata.east_asian_width' checking is kept intact for reducing startup cost.
FUJIWARA Katsunori -
r15066:24efa83d stable
Show More
Name Size Modified Last Commit Author
/ hgext
convert
highlight
inotify
zeroconf
__init__.py Loading ...
acl.py Loading ...
bugzilla.py Loading ...
children.py Loading ...
churn.py Loading ...
color.py Loading ...
eol.py Loading ...
extdiff.py Loading ...
fetch.py Loading ...
gpg.py Loading ...
graphlog.py Loading ...
hgcia.py Loading ...
hgk.py Loading ...
interhg.py Loading ...
keyword.py Loading ...
mq.py Loading ...
notify.py Loading ...
pager.py Loading ...
patchbomb.py Loading ...
progress.py Loading ...
purge.py Loading ...
rebase.py Loading ...
record.py Loading ...
relink.py Loading ...
schemes.py Loading ...
share.py Loading ...
transplant.py Loading ...
win32mbcs.py Loading ...
win32text.py Loading ...