fix: use highlight and cursor from cosmic-text editor

This fixes RTL text in the text_editor widget.
This commit is contained in:
Hojjat 2026-03-26 23:37:30 -06:00 committed by Ashley Wulber
parent 1fdd24ab99
commit e1fc659e64
5 changed files with 57 additions and 188 deletions

View file

@ -256,15 +256,11 @@ pub fn align(
}
}
// TODO: Avoid relayout with some changes to `cosmic-text` (?)
if needs_relayout {
log::trace!("Relayouting paragraph...");
buffer.set_size(
font_system,
Some(min_bounds.width),
Some(min_bounds.height),
);
buffer.set_size(Some(min_bounds.width), Some(min_bounds.height));
buffer.shape_until_scroll(font_system, false);
}
min_bounds