Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-core/src/graphemes.rs')
-rw-r--r--helix-core/src/graphemes.rs17
1 files changed, 0 insertions, 17 deletions
diff --git a/helix-core/src/graphemes.rs b/helix-core/src/graphemes.rs
index 7cb5cd06..a02d6e4d 100644
--- a/helix-core/src/graphemes.rs
+++ b/helix-core/src/graphemes.rs
@@ -278,23 +278,6 @@ pub fn ensure_grapheme_boundary_prev(slice: RopeSlice, char_idx: usize) -> usize
}
}
-/// Returns the passed byte index if it's already a grapheme boundary,
-/// or the next grapheme boundary byte index if not.
-#[must_use]
-#[inline]
-pub fn ensure_grapheme_boundary_next_byte(slice: RopeSlice, byte_idx: usize) -> usize {
- if byte_idx == 0 {
- byte_idx
- } else {
- // TODO: optimize so we're not constructing grapheme cursor twice
- if is_grapheme_boundary_byte(slice, byte_idx) {
- byte_idx
- } else {
- next_grapheme_boundary_byte(slice, byte_idx)
- }
- }
-}
-
/// Returns whether the given char position is a grapheme boundary.
#[must_use]
pub fn is_grapheme_boundary(slice: RopeSlice, char_idx: usize) -> bool {