From eb6e815676243b5f941876b89afd80dfe5f023aa Mon Sep 17 00:00:00 2001
From: "zed-zippy[bot]" <234243425+zed-zippy[bot]@users.noreply.github.com>
Date: Sun, 15 Feb 2026 09:42:28 +0000
Subject: [PATCH] editor: Fix to remove non-functional folding creases from the
gutter (#49200) (cherry-pick to preview) (#49212)
Cherry-pick of #49200 to preview
----
Lsp-based folding disables indentation-based folding. Even though
indentation-based folding is non-functional, the crease icon is still
displayed in the gutter. This PR fixes this mismatch.
Before:
After:
Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
Release Notes:
- Removed non-functional folding creases from the gutter.
Co-authored-by: ozacod
Co-authored-by: ozacod <47009516+ozacod@users.noreply.github.com>
Co-authored-by: ozacod
---
crates/editor/src/editor.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs
index af6478a6199e15ece663b1f8b68240a8276950b2..c157c37eb460bcf2db5b697e4ae1101686d43c36 100644
--- a/crates/editor/src/editor.rs
+++ b/crates/editor/src/editor.rs
@@ -27448,7 +27448,7 @@ impl EditorSnapshot {
}
}
- is_foldable |= self.starts_indent(buffer_row);
+ is_foldable |= !self.use_lsp_folding_ranges && self.starts_indent(buffer_row);
if folded || (is_foldable && (row_contains_cursor || self.gutter_hovered)) {
Some(