Fix crash due to mutating command palette's candidates on confirmation (#3575)

I was seeing a crash when confirming the command palette. It was caused
by getting the palette's `commands` (match candidates) and `matches`
getting out of sync because we mutated `commands` when removing the
selected command.
188d727d31Max Brunsfeld committed on 12/9/2023, 7:16:04 PM· committed by GitHubparents4adafb16b58eb2
1 file changedLine totals unavailable