Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #1145 #1272

Merged
merged 4 commits into from
Feb 11, 2017
Merged

fixes #1145 #1272

merged 4 commits into from
Feb 11, 2017

Conversation

xconverge
Copy link
Member

should work...tested the few cases that were in the issue reported

return true;
} else {
// Check to see if a remapping could potentially be applied when more keys are received
for (let remap of this._remappings) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to make this a return value rather than returning it implicitly as a class property?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Want me to just make a getter for it? It is already used on lines 77 and 83

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or do you mean break off the function into a isRemappingPotential() function that takes the current keystrokes as an input?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean could we return this value from sendKey somehow?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless I am missing something obvious that you can see pretty clearly...

It is definitely possible, the problem I see is that we call handleKeyEvent, which calls sendKey, then it calls handleKeyEventHelper which uses the property

I could make a data structure that returned a few properties but I don't think it will end up being cleaner...

sendkey only returning a boolean seems to make sense to me, I would really only change this to return a true/false/maybe with the data structure anyways

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see what you mean, it would be annoying to thread through. OK, a getter is fine.

@xconverge
Copy link
Member Author

this also fixes #1222

@xconverge
Copy link
Member Author

@johnfn should be good to go now, let me know if there is anything else

@johnfn johnfn merged commit 09eca32 into VSCodeVim:master Feb 11, 2017
@xconverge xconverge deleted the fix-remapper branch February 11, 2017 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants