-
Notifications
You must be signed in to change notification settings - Fork 269
Description
Contributing guidelines
- I have read CONTRIBUTING.md
- I have read CODE_OF_CONDUCT.md
- I have updated 'mini.nvim' to latest version of the
main
branch
Module(s)
mini.jump
Neovim version
0.11.x
Description
When dot-repeating a command which includes a jump (e.g. dt]
), and using a different jump between repeats, the original jump is lost and instead the other jump is repeated.
This works correctly with mini.jump
disabled.
Reproduction
-
Create separate 'nvim-repro' config directory:
- '~/.config/nvim-repro/' on Unix
- '~/AppData/Local/nvim-repro/' on Windows
-
Inside 'nvim-repro' directory create a file named 'init.lua'.
Populate it with the following content:-- Clone latest 'mini.nvim' (requires Git CLI installed) vim.cmd('echo "Installing `mini.nvim`" | redraw') local mini_path = vim.fn.stdpath('data') .. '/site/pack/deps/start/mini.nvim' local clone_cmd = { 'git', 'clone', '--depth=1', 'https://github.com/nvim-mini/mini.nvim', mini_path } vim.fn.system(clone_cmd) vim.cmd('echo "`mini.nvim` is installed" | redraw') -- Make sure 'mini.nvim' is available vim.cmd('packadd mini.nvim') require('mini.deps').setup() -- Add extra setup steps needed to reproduce the behavior require('mini.jump').setup()
-
Run
NVIM_APPNAME=nvim-repro nvim
(i.e. executenvim
withNVIM_APPNAME
environment variable set to "nvim-repro").
Wait for all dependencies to install. -
Enter the following text:
[foo, 1] [foo, 2] [foo, 3]
-
Move to the beginning of the file:
gg0
-
Search for
foo
:/foo<CR>
-
Jump to the first comma:
f,
-
Delete until the closing bracket:
dt]
-
Go to the next search result and jump to the second comma:
nf,
-
Repeat the deletion:
.
Expected result: Everything up to the next closing bracket should get deleted:
[foo]
[foo]
[foo, 3]
Actual result: Everything up to the next comma gets deleted instead:
[foo]
[foo, 3]