Closed nyngwang closed 1 year ago
Could you make a minimum reproduction procedure?
@gen740 Here it is: (Really sorry that I didn't provide it at the moment I posted it!)
Steps:
nvim -u path/to/the_following_lua_file.lua
, and wait for the installation.<CR>
, i.e. Enter key, many times.(Remember to remove the .repro/
folder created under the path where you run the nvim -u ...
command after testing!)
-- ref: https://github.com/folke/lazy.nvim/wiki/Minimal-%60init.lua%60-to-Reproduce-an-Issue
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"--single-branch",
"https://github.com/folke/lazy.nvim.git",
lazypath,
})
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
-- do not remove the colorscheme!
"folke/tokyonight.nvim",
-- add any other pugins here
{
'nyngwang/NeoZoom.lua',
config = function ()
require('neo-zoom').setup()
vim.keymap.set('n', '<CR>', function () vim.cmd('NeoZoomToggle') end, { silent = true, nowait = true })
end
},
{
'gen740/SmoothCursor.nvim',
config = function()
require('smoothcursor').setup {
autostart = true,
fancy = { enable = true },
threshold = 1,
flyin_effect = 'top',
disable_float_win = true,
}
end
}
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
-- add anything else here
vim.opt.termguicolors = true
-- do not remove the colorscheme!
vim.cmd([[colorscheme tokyonight]])
I can reproduce it! But, I have no idea what causes this problem.
FYI, there is a debug function require("smoothcursor.debug").debug()
to show smoothcursor inner status (like information of in which buffer smoothcursor is enabled)
Maybe flyin_effect
will have something to do with this problem... (And might be async function
things)
And writing these comments... I came up with a solution. I will create a PR soon.
Sad news, though. This didn't fix the problem. I have no idea how to fix it...
But, this problem occurs when opening the floating window frequently so many times in a row with the fly_in
effect enabled. So I have to say, this is not a fatal problem.
Sad news, though. This didn't fix the problem. I have no idea how to fix it...
@gen740 Nevermind! You can do whatever you want with this issue, at your pace. (but yes, I still hope this can be fixed someday. I'm not in a hurry for the solution)
(btw, this might be a piece of good news for you: Since I always enable your plugin when recording my plugin DEMOs, people were asking about your plugin. This should increase your users/audiences!)
@gen740 Just confirmed that it works! Thank you a lot!! (I recently also fixed a lot of bugs on NeoZoom.lua, if you want to try.)
Sorry for my abstract title... In short, I'm seeing this bug:
autocmd
on the user side. 🙏(Thanks for your help, again!)
https://user-images.githubusercontent.com/24765272/216315028-2dee99a3-37ae-4c2f-88a8-b34fa1b16dbf.mov
This is the config I use: