documents: undo and redo leave a block only past its own history; typing lands after undo empties the document
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
362a0fc9fa
commit
a3d9f089a3
5 files changed
+137
-87
No files matched your search
@@ -220,6 +220,14 @@ impl TextInput {
|
||||
&self.label
|
||||
}
|
||||
|
||||
/// A step left in that direction of its history.
|
||||
pub(crate) fn can_step(&self, redo: bool) -> bool {
|
||||
match redo {
|
||||
true => self.history.can_redo(),
|
||||
false => self.history.can_undo(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn selection(&self) -> Range<usize> {
|
||||
self.selection.clone()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user