From 9875969cba1f82d9a3f08caee928602691816334 Mon Sep 17 00:00:00 2001 From: Finn Evers Date: Thu, 11 Sep 2025 11:42:18 +0200 Subject: [PATCH] editor: Allow no context for the `excerpt_context_lines` setting (#37982) Closes #37980 There seems to be no reason to hard limit this to 1, and we even have existing UX for this case already: Bildschirmfoto 2025-09-11 um 11 22
57 (Notice the different arrows in the gutter area for single lines) Hence, allowing the value to honor the request from the issue Release Notes: - Allowed `0` as a value for the `excerpt_context_lines` setting --- 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 b731006a62990b5b9de75223ca38fbebb684c91c..f2d5fd5762b22c87c79751753925fd74368fb040 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -24432,5 +24432,5 @@ pub fn multibuffer_context_lines(cx: &App) -> u32 { EditorSettings::try_get(cx) .map(|settings| settings.excerpt_context_lines) .unwrap_or(2) - .clamp(1, 32) + .min(32) }