From 6a090471a800b1001bdfd2b6e0b710c1cd439a4e Mon Sep 17 00:00:00 2001 From: Tino <89810988+ymcx@users.noreply.github.com> Date: Tue, 1 Jul 2025 17:06:54 +0300 Subject: [PATCH] Fix panic in `goto_word` when `editor.jump-label-alphabet` is empty (#13863) --- helix-term/src/commands.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 2cbdeb451..38e52e18c 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -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);