mirror of https://github.com/helix-editor/helix
[text-object/indent] fix: final target should be less indent scope
parent
f63e0a5a51
commit
851f9c73dd
|
@ -3900,7 +3900,7 @@ fn goto_indent_impl(cx: &mut Context, movement: Movement, direction: Direction)
|
||||||
};
|
};
|
||||||
|
|
||||||
if target_idx >= text.len_lines() || target_idx == 0 {
|
if target_idx >= text.len_lines() || target_idx == 0 {
|
||||||
break
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
let target_line = text.line(target_idx);
|
let target_line = text.line(target_idx);
|
||||||
|
@ -3911,8 +3911,8 @@ fn goto_indent_impl(cx: &mut Context, movement: Movement, direction: Direction)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stop when indentation changes
|
// Stop when scoped up
|
||||||
if target_first_char_pos != first_char_pos {
|
if target_first_char_pos < first_char_pos {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue