From fdcedf15b71d0c73b2b08b03f003300722ffd245 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Thu, 9 May 2024 11:43:50 +0200 Subject: [PATCH] editor: Do not show test indicators if a line is folded (#11599) Originally reported by @RemcoSmitsDev Release Notes: - N/A --- crates/editor/src/element.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index d6642f7deb..7a4aa2222b 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -1407,7 +1407,10 @@ impl EditorElement { editor .tasks .keys() - .map(|row| { + .filter_map(|row| { + if snapshot.is_line_folded(*row) { + return None; + } let button = editor.render_run_indicator( &self.style, Some(*row) == active_task_indicator_row, @@ -1426,7 +1429,7 @@ impl EditorElement { gutter_hitbox, cx, ); - button + Some(button) }) .collect_vec() })