Skip to content

fix(repeat): support remapped l key#653

Merged
lewis6991 merged 1 commit into
lewis6991:mainfrom
cljoly:stage_hunk_fix
Oct 16, 2022
Merged

fix(repeat): support remapped l key#653
lewis6991 merged 1 commit into
lewis6991:mainfrom
cljoly:stage_hunk_fix

Conversation

@cljoly

@cljoly cljoly commented Oct 16, 2022

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Owner

Awesome. Thanks!

@cljoly

cljoly commented Oct 16, 2022

Copy link
Copy Markdown
Contributor Author

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

@cljoly

cljoly commented Oct 16, 2022

Copy link
Copy Markdown
Contributor Author

@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