T21a round 1 fixes
- Enter over a selection drops it and splits at its start, one undo step - undo and redo keep where the caret was and put it back - a format unwraps only its own markers, so italic inside bold keeps the bold - keys into a merged table cell land on the cell that shows - undo rebuilds a block whose kind needs other fields, so styling comes back - tests activate their window, as focus events need - undo bookkeeping moves to blocks/edit.rs
This commit is contained in:
1 parent
6a9ce8a2c3
commit
f3e2c6c27f
10 files changed
+330
-81
No files matched your search
@@ -150,6 +150,16 @@ impl BlockKind {
|
||||
}
|
||||
}
|
||||
|
||||
/// Whether a field made for this kind serves `other` unchanged: the same highlighter and hint.
|
||||
pub(crate) fn same_fields(&self, other: &Self) -> bool {
|
||||
std::mem::discriminant(self) == std::mem::discriminant(other)
|
||||
&& match (self, other) {
|
||||
(Self::Heading(one), Self::Heading(two)) => one == two,
|
||||
(Self::Synced(one), Self::Synced(two)) => one == two,
|
||||
_ => true,
|
||||
}
|
||||
}
|
||||
|
||||
/// Prose: Enter splits it, Backspace at its start turns it back into text or joins it up.
|
||||
pub fn is_prose(&self) -> bool {
|
||||
matches!(
|
||||
|
||||
Reference in new issue
Block a user