Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

tasks: Display runnables at the start of folds (#18526)

Piotr Osiewicz250f2e76eb6f
diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs
index e5c067e37ec..1c35fa6bcdd 100644
--- a/crates/editor/src/element.rs
+++ b/crates/editor/src/element.rs
@@ -1646,7 +1646,16 @@ impl EditorElement {
return None;
}
if snapshot.is_line_folded(multibuffer_row) {
- return None;
+ // Skip folded indicators, unless it's the starting line of a fold.
+ if multibuffer_row
+ .0
+ .checked_sub(1)
+ .map_or(false, |previous_row| {
+ snapshot.is_line_folded(MultiBufferRow(previous_row))
+ })
+ {
+ return None;
+ }
}
let button = editor.render_run_indicator(
&self.style,