Unnamed repository; edit this file 'description' to name the repository.
goto_word: Reject jump label characters with modifiers
Previously you could use `<A-a><A-b>` to jump to a label "ab". We should not treat characters with modifiers the same as characters without. With this change the `<A-a>` input exits out of the jumping on-next-key. Fixes #12695
Michael Davis 2025-01-27
parent b00b475 · commit f5f9f49
-rw-r--r--helix-term/src/commands.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index eeb83d1c..7b746548 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -6488,6 +6488,7 @@ fn jump_to_label(cx: &mut Context, labels: Vec<Range>, behaviour: Movement) {
let alphabet = &cx.editor.config().jump_label_alphabet;
let Some(i) = event
.char()
+ .filter(|_| event.modifiers.is_empty())
.and_then(|ch| alphabet.iter().position(|&it| it == ch))
else {
doc_mut!(cx.editor, &doc).remove_jump_labels(view);