mirror of https://github.com/helix-editor/helix
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 #12695pull/11492/merge
parent
b00b475dfe
commit
f5f9f499cf
|
@ -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 alphabet = &cx.editor.config().jump_label_alphabet;
|
||||||
let Some(i) = event
|
let Some(i) = event
|
||||||
.char()
|
.char()
|
||||||
|
.filter(|_| event.modifiers.is_empty())
|
||||||
.and_then(|ch| alphabet.iter().position(|&it| it == ch))
|
.and_then(|ch| alphabet.iter().position(|&it| it == ch))
|
||||||
else {
|
else {
|
||||||
doc_mut!(cx.editor, &doc).remove_jump_labels(view);
|
doc_mut!(cx.editor, &doc).remove_jump_labels(view);
|
||||||
|
|
Loading…
Reference in New Issue