Skip to content

Commit

Permalink
fix(repeat): support remapped l key
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cljoly authored and lewis6991 committed Oct 16, 2022
1 parent bf20b5d commit 56e01cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lua/gitsigns/repeat.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion teal/gitsigns/repeat.tl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function M.mk_repeatable(fn: function): function
end
end

vim.cmd'normal g@l'
vim.cmd'normal! g@l'
end
end

Expand Down

0 comments on commit 56e01cb

Please sign in to comment.