diff options
author | David Adam <zanchey@ucc.gu.uwa.edu.au> | 2015-08-03 11:33:30 +0800 |
---|---|---|
committer | David Adam <zanchey@ucc.gu.uwa.edu.au> | 2015-08-03 14:18:06 +0800 |
commit | e56f0628d50baabe075e0fe95fad9e05f048b0a6 (patch) | |
tree | 3a8f92b412c021709438efac1e64b45c4383d151 /src/screen.cpp | |
parent | 546ba888ae9c5b1f1600b5bea47ef607bbf4cb4e (diff) |
common.cpp: check wcwidth for supported characters
Rather than trying to detect Unicode support from the environment, check
the printable width of characters in the current locale before deciding
on whether to use them.
Closes #1927.
Diffstat (limited to 'src/screen.cpp')
-rw-r--r-- | src/screen.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/screen.cpp b/src/screen.cpp index 1971bb57..e248079a 100644 --- a/src/screen.cpp +++ b/src/screen.cpp @@ -1424,6 +1424,7 @@ void s_reset(screen_t *s, screen_reset_mode_t mode) wcstring abandon_line_string; abandon_line_string.reserve(screen_width + 32); //should be enough + /* Don't need to check for wcwidth errors; this is done when setting up omitted_newline_char in common.cpp */ int non_space_width = wcwidth(omitted_newline_char); if (screen_width >= non_space_width) { |