Commit a3aa71a
util,readline: NFC-normalize strings before getStringWidth
The assumption here is that decomposed characters render like their
composed character equivalents, and that working with the former
comes with a risk of over-estimating string widths given that
we compute them on a per-code-point basis. The regression test
added here (한글 vs 한글) is an example of that happening.
PR-URL: #33052
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>1 parent 98a2c67 commit a3aa71a
File tree
2 files changed
+19
-5
lines changed- lib/internal/util
- test/parallel
2 files changed
+19
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1917 | 1917 | | |
1918 | 1918 | | |
1919 | 1919 | | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
| 1925 | + | |
| 1926 | + | |
1920 | 1927 | | |
1921 | 1928 | | |
1922 | 1929 | | |
| |||
1926 | 1933 | | |
1927 | 1934 | | |
1928 | 1935 | | |
1929 | | - | |
1930 | | - | |
| 1936 | + | |
| 1937 | + | |
1931 | 1938 | | |
1932 | 1939 | | |
1933 | 1940 | | |
| |||
1947 | 1954 | | |
1948 | 1955 | | |
1949 | 1956 | | |
1950 | | - | |
1951 | | - | |
1952 | | - | |
| 1957 | + | |
1953 | 1958 | | |
1954 | 1959 | | |
1955 | 1960 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
0 commit comments