Add move_to method to Editor

This commit is contained in:
Héctor Ramón Jiménez 2025-12-01 20:11:42 +01:00
parent 63e9eeffb5
commit 4428f31b4f
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
4 changed files with 295 additions and 258 deletions

View file

@ -35,6 +35,9 @@ pub trait Editor: Sized + Default {
/// Performs an [`Action`] on the [`Editor`].
fn perform(&mut self, action: Action);
/// Moves the cursor to the given position.
fn move_to(&mut self, cursor: Cursor);
/// Returns the current boundaries of the [`Editor`].
fn bounds(&self) -> Size;