linux/text: fix invalid span creation (#8286)

This fixes a crash when showing completions.

Release Notes:

- N/A
This commit is contained in:
Paul Berg 2024-02-24 02:03:00 +01:00 committed by GitHub
parent aef299be3d
commit 9b44ba9382
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -329,7 +329,7 @@ impl LinuxTextSystemState {
let font = &self.fonts[run.font_id.0];
let font = self.font_system.db().face(font.id()).unwrap();
attrs_list.add_span(
offs..run.len,
offs..offs + run.len,
Attrs::new()
.family(Family::Name(&font.families.first().unwrap().0))
.stretch(font.stretch)