bug: Cannot disable Enhanced f/t motions when f/t is remapped
Did you check docs and existing issues?
- [X] I have read all the flash.nvim docs
- [X] I have searched the existing issues of flash.nvim
- [X] I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
0.9.4
Operating system/version
Debian 12
Describe the bug
t is remapped to something else. In this case, to flash.jump()
On the very first time of entering a file in neovim, pressing t properly calls flash.jump(). Any subsequent presses of t invokes the enhahced t motions. The enhanced t motions are disabled properly if jump were remapped to anything else like b. These are all true as well when done with f.
{
"folke/flash.nvim",
event = "VeryLazy",
---@type Flash.Config
opts = {
modes = {
char = { enabled = false },
},
},
keys = {
{ "t", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
},
},
I've also tried to set the keymaps like so but no fixes.
config = function()
vim.keymap.set({ "n", "x", "o" }, "t", function()
require("flash").jump()
end)
end
Steps To Reproduce
- Remap
t. - Open nvim
- Open a file
- Press
t flash.jump()is invoked- Exit out of jump mode.
- Press
tagain. - It now acts as enhanced t motions.
Expected Behavior
Pressing t should always invoke flash.jump() and not revert back to enhanced t motions.
Additional
i have modes = { search = { enabled = false } } and it also suffers from this. Once behavior regresses back to enhanced motions, it seems that the plugin options are all reset. This is only triggered when using the remapped t or f.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
I'm having the same problem as well
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.