Skip to content

Commit 0d78b48

Browse files
committed
Map the negative values of widechar_wcwidth()
1 parent cba6fa6 commit 0d78b48

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/util/widechar_width.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ namespace {
2121
/* Special width values */
2222
enum {
2323
widechar_nonprint = -1, // The character is not printable.
24-
widechar_combining = -2, // The character is a zero-width combiner.
25-
widechar_ambiguous = -3, // The character is East-Asian ambiguous width.
26-
widechar_private_use = -4, // The character is for private use.
27-
widechar_unassigned = -5, // The character is unassigned.
28-
widechar_widened_in_9 = -6, // Width is 1 in Unicode 8, 2 in Unicode 9+.
29-
widechar_non_character = -7 // The character is a noncharacter.
24+
widechar_combining = 0, // The character is a zero-width combiner.
25+
widechar_ambiguous = 1, // The character is East-Asian ambiguous width.
26+
widechar_private_use = 1, // The character is for private use.
27+
widechar_unassigned = -1, // The character is unassigned.
28+
widechar_widened_in_9 = 2, // Width is 1 in Unicode 8, 2 in Unicode 9+.
29+
widechar_non_character = -1 // The character is a noncharacter.
3030
};
3131

3232
/* An inclusive range of characters. */

0 commit comments

Comments
 (0)