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
This commit is contained in:
parent
b00b475dfe
commit
f5f9f499cf
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue