-
Notifications
You must be signed in to change notification settings - Fork 282
Description
Contributing guidelines
- I have read CONTRIBUTING.md
- I have read CODE_OF_CONDUCT.md
- I have updated 'mini.nvim' to latest version
Module(s)
mini.animate
Description
I'm using mini.animate (and I love it), but I have an issue with relatively large files and when using vim-visual-multi.
I do have a bunch of folds in the file, and when entering visual multi mode:
- I think visual multi expands the folds while in multi mode and restores them (collapses them)
- This causes a "movement" in the window, and
mini.animatetries to animate this movement.
The issues arises when the file, as I mentioned, is a large file. Seems like in this case visual multi mode tries to select the next occurrence while mini.animate is still animating the movement, and this creates an issue causing a random word to be selected as next occurrence.
My config:
local animate = require('mini.animate')
require('mini.animate').setup({
cursor = {
timing = animate.gen_timing.linear({ duration = 80, unit = 'total' }),
},
resize = {
timing = animate.gen_timing.linear({ duration = 100, unit = 'total' }),
},
scroll = {
timing = animate.gen_timing.linear({ duration = 150, unit = 'total' }),
},
})Neovim version
NVIM v0.9.1
Steps to reproduce
Sorry, didn't try the bug with minimal config; let me know if it's absolutely necessary and I can do that.
- Open
nvimwith a large file (say, 600 lines) that has a bunch of folds - Open a single fold and enter visual multi mode (default
ctrl+n) with cursor being on a word that's commonly used in the file (e.g.,echoin a bash script file) - Two things can happen:
- There's either an unnecessary jump/animation in the window because of the folds being opened by
vim-visual-multi - (the worse case) while a window animation is in progress,
vim-visual-multiselects the next word, but that doesn't match the cursor word.
- There's either an unnecessary jump/animation in the window because of the folds being opened by
Expected behavior
If I use neoscroll, that animation doesn't happen, and there's no issue.
Actual behavior
I'd love for mini.animate to not do this since I'm very dependent on vim-visual-multi, but this conflict between the two plugins is a bit annoying.