Fix a crash when there aren't any recentCommands yet#11082
Conversation
@check-spelling-bot ReportUnrecognized words, please review:
Previously acknowledged words that are now absentSPACEBAR Unregister xIcon yIconTo accept these unrecognized words as correct (and remove the previously acknowledged and now absent words), run the following commands... in a clone of the git@github.com:microsoft/terminal.git repository ✏️ Contributor please read thisBy default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.
If the listed items are:
See the 🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉 🗜️ If you see a bunch of garbageIf it relates to a ... well-formed patternSee if there's a pattern that would match it. If not, try writing one and adding it to a Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines. Note that patterns can't match multiline strings. binary-ish stringPlease add a file path to the File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.
|
|
Sorry |
lol np, this is the kind of bug that anyone could hit 😋 |
fricken VS Co-authored-by: Dustin L. Howett <duhowett@microsoft.com>
|
Hello @zadjii-msft! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
The first time you open commandline mode,
recentCommandsdoesn't exist yet. However, we immediately try to read theSize()in a couple places. This'll A/V and we'll crash 😨The fix is easy - don't try and read the size of the non-existent
recentCommandsFound this while playing with #11069
Regressed in #11030
Didn't bother filing an issue for it when I have the fix in hand