fix(lsp): a panic caused by completion with decl_id out of range (#15576)

Fixes a bug caused by #15536 
Sorry about that, @fdncred 

# Description

I've made the panic reproducible in the test case.

TLDR: completer will sometimes return new decl_ids outside of the range
of the engine_state passed in.

# User-Facing Changes

bug fix

# Tests + Formatting

+1

# After Submitting
This commit is contained in:
zc he
2025-04-16 19:43:21 +08:00
committed by GitHub
parent 24cc2f9d87
commit cd4560e97a
3 changed files with 66 additions and 44 deletions

View File

@@ -10,3 +10,5 @@ def "config n foo bar" [
echo "🤔🐘"
| str substring (str substring -)
}
config n # don't panic!