Add mapping functions#1746
Draft
citizenmatt wants to merge 19 commits intoJetBrains:masterfrom
Draft
Conversation
If there were no matching prefixes, it would return all nodes. And if the prefix was an actual match, it would return it twice
While it does give us a read-only abstraction over KeyMapping, it means we have two methods that do the same thing - getKeyMapping and getKeyMappingLayer without a clear indication of what the difference is. Furthermore, external usages only use getKeyMapping, and the layer isn't used at all.
Also makes an interface function into a protected base class function
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.
This PR adds the mapping functions:
hasmapto()maparg()mapcheck()maplist()mapset()It fixes a couple of small bugs along the way: VIM-4225, which used the wrong mapping for vim-sneak in op-pending mode, and a bug in
:mapoutput where it would list all maps if there were no matching prefixes (e.g. typing:map q23will list all maps because there isn't a map that starts withq23).This PR uses a function added as part of #1446, so is marked as draft until that is merged. Then I'll rebase and force push this one.