editor: typewriter room as rows, so drawing and text queries share one origin; a placement resets centering
CI / platforms (windows-latest) (push) Failing after 8s
CI / site (push) Successful in 22s
CI / crate (push) Failing after 10m53s
CI / platforms (ubuntu-24.04) (push) Canceled after 0s

This commit is contained in:
ZacharyZhang-NY committed 2026-10-12 09:13:49 -04:00
1 parent f102ea0b6c
commit cf9cc1971c
8 files changed
+91 -19

No files matched your search

+3 -1
View File
@@ -106,7 +106,7 @@ impl MarkdownDocument {
if matches!(self.mode, MarkdownMode::Source | MarkdownMode::Split) {
editor
.scroll
.scroll_to_item_strict(line, ScrollStrategy::Top);
.scroll_to_item_strict(line + editor.pad, ScrollStrategy::Top);
self.placing(ask);
// The editor's offset holds it from the next frame.
return cx.on_next_frame(window, move |document, _, cx| {
@@ -158,6 +158,8 @@ impl MarkdownDocument {
});
}
self.top = None;
// The view moved: center again.
self.centered = None;
cx.notify();
}