Skip to content

Commit d1ae83e

Browse files
authored
Revert "build(deps): bump unicode-width from =0.1.12 to =0.1.14 (#14643)" (#15150)
This reverts commit 594b565.
1 parent ad5ac37 commit d1ae83e

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

helix-core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ unicode-segmentation.workspace = true
2929
# width definitions in terminals, we need to replace it.
3030
# For now lets lock the version to avoid rendering glitches
3131
# when installing without `--locked`
32-
unicode-width = "=0.1.14"
32+
unicode-width = "=0.1.12"
3333
unicode-general-category = "1.1"
3434
slotmap.workspace = true
3535
tree-house.workspace = true

helix-core/src/graphemes.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ pub fn grapheme_width(g: &str) -> usize {
113113
// We use max(1) here because all grapeheme clusters--even illformed
114114
// ones--should have at least some width so they can be edited
115115
// properly.
116+
// TODO properly handle unicode width for all codepoints
117+
// example of where unicode width is currently wrong: 🤦🏼‍♂️ (taken from https://hsivonen.fi/string-length/)
116118
UnicodeWidthStr::width(g).max(1)
117119
}
118120
}

0 commit comments

Comments
 (0)