fix: vi-mode chevron enabled when vi-mode disabled#659
Open
RWejlgaard wants to merge 1 commit into
Open
Conversation
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.
Description
On some distributions the ending chevron would be pointing to the left when it should point to the right.
Motivation and Context
Tide figured out "is the user on emacs or vi bindings?" by comparing
$fish_key_bindingsto the literal stringfish_default_key_bindings.Problem: most emacs users never set that variable at all. Fish just uses emacs bindings by default and leaves the variable empty. So the equality check came back false and we fell through to the vi switch. Since
$fish_bind_modeis default whether you're in vi command mode or just using plain emacs bindings, the prompt happily rendered❮(and the vi_mode item lit up) for people who had nothing to do with vi mode.This PR treats an empty
$fish_key_bindingsthe same as the explicit default, so vi rendering only kicks in when someone actually opted into vi bindings.Closes #640 #641 #622 #625
Screenshots (if appropriate)
How Has This Been Tested
Tested on my own machine (MacOS) and on linux via docker containers.
Checklist