projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add an option to use wcwidth_cjk() instead of wcwidth(), as several people
[u/mdw/putty]
/
terminal.c
diff --git
a/terminal.c
b/terminal.c
index
eaaa04d
..
904f1b8
100644
(file)
--- a/
terminal.c
+++ b/
terminal.c
@@
-2845,7
+2845,9
@@
static void term_out(Terminal *term)
if (DIRECT_CHAR(c))
width = 1;
if (!width)
- width = wcwidth((wchar_t) c);
+ width = (term->cfg.cjk_ambig_wide ?
+ wcwidth_cjk((wchar_t) c) :
+ wcwidth((wchar_t) c));
if (term->wrapnext && term->wrap && width > 0) {
cline->lattr |= LATTR_WRAPPED;