fix slicing crash in `do_completion` (#28820)

Release Notes:

- N/A
3f4d4af080João Marcos committed on 4/15/2025, 11:37:37 PM· committed by GitHubparent68ec1d7
1 file changedLine totals unavailable