1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -04:00

Export ByteRange and CharRange (#8247)

This commit is contained in:
Emil Ernerfeldt
2026-06-22 05:45:48 +02:00
committed by GitHub
parent 467c5b84f0
commit 428e027ec7
4 changed files with 8 additions and 6 deletions

View File

@@ -604,7 +604,7 @@ impl Highlighter {
}
#[cfg(feature = "syntect")]
fn as_byte_range(whole: &str, range: &str) -> std::ops::Range<egui::text::ByteIndex> {
fn as_byte_range(whole: &str, range: &str) -> egui::text::ByteRange {
use egui::text::ByteIndex;
let whole_start = whole.as_ptr() as usize;
let range_start = range.as_ptr() as usize;