From 851f9c73dd8ce1b78c340cf90a63fdac4f632714 Mon Sep 17 00:00:00 2001 From: ktunprasert Date: Sat, 19 Jul 2025 14:53:18 +0100 Subject: [PATCH] [text-object/indent] fix: final target should be less indent scope --- helix-term/src/commands.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index db940ddb9..3561f6ea5 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -3900,7 +3900,7 @@ fn goto_indent_impl(cx: &mut Context, movement: Movement, direction: Direction) }; if target_idx >= text.len_lines() || target_idx == 0 { - break + break; } let target_line = text.line(target_idx); @@ -3911,8 +3911,8 @@ fn goto_indent_impl(cx: &mut Context, movement: Movement, direction: Direction) continue; } - // Stop when indentation changes - if target_first_char_pos != first_char_pos { + // Stop when scoped up + if target_first_char_pos < first_char_pos { break; } }