From 901fe23e2541ed838ff041f1049467a131a71034 Mon Sep 17 00:00:00 2001 From: KyleBarton Date: Wed, 21 Jan 2026 10:47:54 -0800 Subject: [PATCH] Pop end row if the end is equal to the starting sticky row (#47314) Closes #47307 In markdown, the outline item for a heading actually ends on the same row as the next outline item (see #47307 for the visual glitch). This change makes it so that the end row calculation accounts for that, and you don't have two different display points where content is potentially scrolling out of view. Fixed visually: https://github.com/user-attachments/assets/e0a7e57a-fd41-4484-87e9-ac3e51d0b927 Release Notes: - Fixed a visual glitch with sticky scroll headers in markdown --- crates/editor/src/element.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index 7f29097c152ae2acf5c4b514100b6c977d7bc576..7050b4f5cfb36e35aa0dcbaba3f0d87f1d982cb9 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -4856,7 +4856,7 @@ impl EditorElement { while end_rows .last() - .is_some_and(|&last_end| last_end < sticky_row) + .is_some_and(|&last_end| last_end <= sticky_row) { end_rows.pop(); }