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.

indent guides: Adjust handling of folded lines (#12375)

Bennet Bo Fenner1cf3496fdaa3
diff --git a/crates/editor/src/indent_guides.rs b/crates/editor/src/indent_guides.rs
index 3e212b047c9..1b780e47085 100644
--- a/crates/editor/src/indent_guides.rs
+++ b/crates/editor/src/indent_guides.rs
@@ -147,7 +147,9 @@ pub fn indent_guides_in_range(
.into_iter()
.filter(|indent_guide| {
// Filter out indent guides that are inside a fold
- !snapshot.is_line_folded(indent_guide.multibuffer_row_range.start)
+ !snapshot.is_line_folded(MultiBufferRow(
+ indent_guide.multibuffer_row_range.start.0.saturating_sub(1),
+ ))
})
.collect()
}