Commit c82c084
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 <me@gus.host>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent 4abc45a commit c82c084
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 | |
|---|---|---|---|
| |||
1922 | 1922 | | |
1923 | 1923 | | |
1924 | 1924 | | |
| 1925 | + | |
| 1926 | + | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
1925 | 1932 | | |
1926 | 1933 | | |
1927 | 1934 | | |
| |||
1931 | 1938 | | |
1932 | 1939 | | |
1933 | 1940 | | |
1934 | | - | |
1935 | | - | |
| 1941 | + | |
| 1942 | + | |
1936 | 1943 | | |
1937 | 1944 | | |
1938 | 1945 | | |
| |||
1952 | 1959 | | |
1953 | 1960 | | |
1954 | 1961 | | |
1955 | | - | |
1956 | | - | |
1957 | | - | |
| 1962 | + | |
1958 | 1963 | | |
1959 | 1964 | | |
1960 | 1965 | | |
| |||
| 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