From 250f2e76eb6f97fe097ee39863c621335762c102 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Mon, 30 Sep 2024 08:05:51 +0200 Subject: [PATCH] tasks: Display runnables at the start of folds (#18526) Release Notes: - Fixed task indicators not showing up at the starts of folds. --- crates/editor/src/element.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index e5c067e37ec3dc79ea3ade76a98ce7bb3b38497b..1c35fa6bcdd4e80bf503ff2ef5d067f92705f6bd 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,