Documents: an open block keeps its look
The open field sits in the closed block's frame at its size, line height and weight; headings keep their step. Code and math keep their panel. Typewriter centering also keys on the ends' room, so a block opened at the same height still centers. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
cdc5ce8247
commit
bff7ebcd64
7 files changed
+150
-34
No files matched your search
@@ -90,9 +90,9 @@ impl MarkdownDocument {
|
||||
block.size.height -= self.room;
|
||||
}
|
||||
let view = self.list.viewport_bounds();
|
||||
// A new layout or a resize moves it too.
|
||||
let heights =
|
||||
[block.size.height, view.size.height].map(|height| f32::from(height).round() as u64);
|
||||
// A new layout, a resize or the ends' room moves it.
|
||||
let heights = [block.size.height, view.size.height, self.room]
|
||||
.map(|height| f32::from(height).round() as u64);
|
||||
let moved = (ix, self.edits, self.typed, heights);
|
||||
if self.centered == Some(moved) {
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user