-
Notifications
You must be signed in to change notification settings - Fork 9
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
Horizontal cursor position clobbered #4
Comments
Hi, thanks for reporting this issue. Unfortunately I cannot reproduce this bug. The following is the behavior of this plugin under normal mode, is this what you expected? If not, please provide the minimal config that can reproduce this bug and screen recording: simplescreenrecorder-2023-03-31_09.49.22.mp4 |
Should've mentioned that this bug doesn't occur when using -- ~/.config/nvim/init.lua
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
-- load installed plugins and their configurations
require("lazy").setup("plugins", {
performance = {
cache = {
enabled = true,
},
reset_packpath = true,
rtp = {
reset = true,
disabled_plugins = {
"gzip",
"matchit",
"matchparen",
"netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
}) -- ~/.config/nvim/lua/plugins/ui.lua
return {
{
'Bekaboo/deadcolumn.nvim',
event = { 'BufReadPre', 'BufNewFile' },
opts = {
blending = {
threshold = 0.75,
},
warning = {
colorcode = '#ED8796',
}
}
}
} |
I found a naive solution which is to remove the |
Good catch, but the real problem here is not vim api functions, it is setting The reason why I conclude the problem comes from option setting is that if you open neovim with This is beyond deadcolumn.nvim and I don't think there is an easy fix to this, maybe we should report it to neovim. PR is welcome. |
Interesting, thanks for the response and quick fix. I also noticed that this can be fixed by saving and restoring the window state. I tested both methods and I think with this way the cursor is always saved even when switching tabs or buffers for example, which will cause the cursor to reset with the current fix. But definitely not a big issue as the main problem is largely fixed. Still, if you're interested I will link the change and up to you if you want to do anything with this, thanks again: |
Seems that it is a better solution, please make a PR and I will be happy to accept it. PS: is it still necessary to check |
Sounds good, I'll make a PR very soon, going to eat now. And I'm not sure: I'll test that as well. As of now I don't know anything about |
Hi and thanks for the great plugin! One small bug I noticed: when using this plugin, my horizontal cursor position is not saved in normal mode, same problem found here or here. I really like this plugin but this issue bugs me so hopefully it can be fixed, thank you!! (P.S. when disabling the plugin, horizontal cursor position is again saved correctly)
The text was updated successfully, but these errors were encountered: