-
Notifications
You must be signed in to change notification settings - Fork 247
fix(repeatable_move): bug when nil was returned or normal command used; no longer requires { expr = true } #795
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
Conversation
…s since the { expr = true } throws on repeatable non builtin returns; fixed selection mode on selection textobjects; see nvim-treesitter/nvim-treesitter-textobjects#795
README.md
Outdated
| -- vim.keymap.set({ "n", "x", "o" }, ";", ts_repeat_move.repeat_last_move) | ||
| -- vim.keymap.set({ "n", "x", "o" }, ",", ts_repeat_move.repeat_last_move_opposite) | ||
| vim.keymap.set({ "n", "x", "o" }, ";", ts_repeat_move.repeat_last_move) | ||
| vim.keymap.set({ "n", "x", "o" }, ",", ts_repeat_move.repeat_last_move_opposite) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can keep it commented so people don't set both keymaps by accident
|
Can you keep the change minimal, like get rid of the fennel textobject changes? Also, you can just paste the snippet from the |
…fied the README to address the change; no longer requires { expr = true }
|
@kiyoon oh yeah my apologies. Discarded the mentioned textobject change and kept one of the both suggested keymaps options for repeatable_move commented as you suggested. |
|
For example, the nvim-treesitter-textobjects/lua/nvim-treesitter/textobjects/repeatable_move.lua Lines 107 to 121 in 71385f1
Is there any reason why you would change it to |
|
No particular reason really, I just searched for a way to feed keys to the input, but the master branch snippet should in fact be more performant. Changed as suggested. |


Should fix #775
2025-08-27.19-14-14.mp4
Not sure if this fix is already being addressed in another way or refactor process, but just in case, the move_repeatable function was failing when no string was being returned (nil in this case) due to { expr = true } keymap options.