From 80596f81a26aca69d66663519b661dee7859f9ee Mon Sep 17 00:00:00 2001 From: "Alexis (Poliorcetics) Bourget" Date: Sat, 29 Jul 2023 02:30:36 +0200 Subject: [PATCH] factorise duplicated call --- helix-term/src/ui/editor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index 1f306aeff..af24ee423 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -936,7 +936,7 @@ impl EditorView { let end = it.start_byte(); // only match @context.end nodes that aren't at the end of the line (ctx_start_row != it.start_position().row && ctx_start_range.contains(&end)) - .then_some(ctx_start_byte..it.start_byte().saturating_sub(1)) + .then_some(ctx_start_byte..end.saturating_sub(1)) }) // in some cases, the start byte of a block is on the next line // which causes to show the actual first line of content instead of