editor: Do not show test indicators if a line is folded (#11599)

Originally reported by @RemcoSmitsDev



Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2024-05-09 11:43:50 +02:00 committed by GitHub
parent bd6d385817
commit fdcedf15b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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()
})