Fix crash when keybindings are disabled that normally show in the status bar#5655
Merged
Conversation
…tatus bar If a keybinding that we want to display in the options bar was set to <disabled> by the user, in pre-0.62 versions we would still display the command, but with no keybinding. This was arguably not very useful before, but now it actually crashes because we would now try to display the first key of the slice of configured keys (crash introduced in 3d18ee8). Fix the crash by not showing those commands at all.
This doesn't make a difference for the behavior, it just looks strange to include the empty bindings first and then filter them out in the next statement.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If a keybinding that we want to display in the options bar was set to
<disabled>by the user, in pre-0.62 versions we would still display the command, but with no keybinding. This was arguably not very useful before, but now it actually crashes because we would now try to display the first key of the slice of configured keys (crash introduced in 3d18ee8). Fix the crash by not showing those commands at all.