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

fix(repeat): support remapped l key #653

Merged
merged 1 commit into from
Oct 16, 2022
Merged

Conversation

cljoly
Copy link
Contributor

@cljoly cljoly commented Oct 16, 2022

I use a non-qwerty layout and so hjkl keys are not close to home row,
but instead scattered around the keyboard. Consequently, I remap l to
something more convenient.

Recently (it turns out, after commit
9787c94), commands like Gitsigns stage_hunk stopped working, i.e. calling them would not stage the given
hook.

The problem is that mk_repeatable assumes a default mapping on l
when it calls normal g@l. Calling normal! fixes this, because then
custom mappings are disregarded and normal g@l calls the stage_hunk
or whatever was made repeatable.

I believe this should fix #651, although I did not test that.

I use a non-qwerty layout and so `hjkl` keys are not close to home row,
but instead scattered around the keyboard. Consequently, I remap `l` to
something more convenient.

Recently (it turns out, after commit
9787c94), commands like `Gitsigns
stage_hunk` stopped working, i.e. calling them would not stage the given
hook.

The problem is that `mk_repeatable` assumes a default mapping on `l`
when it calls `normal g@l`. Calling `normal!` fixes this, because then
custom mappings are disregarded and `normal g@l` calls the `stage_hunk`
or whatever was made repeatable.

I believe this should fix lewis6991#651, although I did not test that.
@lewis6991 lewis6991 merged commit 56e01cb into lewis6991:main Oct 16, 2022
@lewis6991
Copy link
Owner

Awesome. Thanks!

@cljoly
Copy link
Contributor Author

cljoly commented Oct 16, 2022

Thanks for the quick turn-around and for making this awesome plugin!

@cljoly
Copy link
Contributor Author

cljoly commented Oct 16, 2022

@lewis6991 Would you mind adding the hacktoberfest-accepted label please? 😇
This way it would count in my hacktoberfest PRs.

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.

staging not working with custom keyboard layout
2 participants