documents: one undo history; a block's own never runs
Undo or redo in an open block writes it back as one step and steps the document, so redo survives mode switches and further undos. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
a3d9f089a3
commit
639521e109
4 files changed
+35
-39
No files matched your search
@@ -220,14 +220,6 @@ 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