1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 06:40:06 -04:00

More byte index

This commit is contained in:
Emil Ernerfeldt
2026-06-21 20:41:08 -07:00
parent b65b82ad7a
commit add90a18c8
3 changed files with 6 additions and 4 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;