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

Release Notes:

- Fixed task indicators not showing up at the starts of folds.
This commit is contained in:
Piotr Osiewicz 2024-09-30 08:05:51 +02:00 committed by GitHub
parent 5f35fa5d92
commit 250f2e76eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,