mirror of https://github.com/helix-editor/helix
Fix panic in `goto_word` when `editor.jump-label-alphabet` is empty (#13863)
parent
6081a5df81
commit
6a090471a8
|
@ -6728,6 +6728,10 @@ fn jump_to_word(cx: &mut Context, behaviour: Movement) {
|
|||
// Calculate the jump candidates: ranges for any visible words with two or
|
||||
// more characters.
|
||||
let alphabet = &cx.editor.config().jump_label_alphabet;
|
||||
if alphabet.is_empty() {
|
||||
return;
|
||||
}
|
||||
|
||||
let jump_label_limit = alphabet.len() * alphabet.len();
|
||||
let mut words = Vec::with_capacity(jump_label_limit);
|
||||
let (view, doc) = current_ref!(cx.editor);
|
||||
|
|
Loading…
Reference in New Issue