Closed bassamsdata closed 8 months ago
Hi, thanks for your report. Maybe this is related to https://github.com/Bekaboo/deadcolumn.nvim/issues/4. Need to take a closer look on this, but I am 90% sure the cause is that setting an option will make nvim lose its horizontal cursor position. Maybe we should report this to neovim once I find a minimal repro.
Thank you for the prompt answer
So vim.opt.colorcolumn
could be the reason here. I'll do some tests again and check if I can reproduce it in different situations without the plugin.
@bassamsdata deadcolumn has been refactored to use winhl option instead of colorcolumn option now.
This bug has been reported to neovim: https://github.com/neovim/neovim/issues/27470
thank you, I was tinkering with the time thing related to the autocmd of CursorMoved and tried to defer it but yea, the issue persisted. the minimal.lua file reproduce the issue indeed, thanks again.
Should be fixed by https://github.com/neovim/neovim/pull/27515
Firstly, I want to express my sincere thanks for this plugin.
Description: I've encountered an issue where the cursor loses its column position when scrolling down with the plugin active. This problem persists in nightly builds (I've tried multiple recent versions), but it doesn't occur in stable builds.
While I understand nightly builds may have issues, I wanted to report this problem for consideration.
To Reproduce:
Code to Reproduce
```sh mkdir ~/.config/testcolumn cd ~/.config/testcolumn touch init.lua NVIM_APPNAME=testcolumn nvim ``` init.lua file ```lua vim.opt.number = true vim.opt.relativenumber = true 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", lazypath, }) end vim.opt.rtp:prepend(lazypath) require("lazy").setup({ "Bekaboo/deadcolumn.nvim", event = { "InsertEnter" }, config = function() vim.opt.colorcolumn = "80" local opts = { modes = { "n", "i" }, blending = { threshold = 0.75, }, warning = { alpha = 0.1, }, } require("deadcolumn").setup(opts) end, }) ```The video demonstrates that the issue does not exist before activating the plugin. However, after inserting and saving the file, the problem occurs when scrolling down a long line. Video:
https://github.com/Bekaboo/deadcolumn.nvim/assets/105807570/44e07f6e-fef1-45cb-82e4-7cc8bb30047f
OS: MacOS term: wezterm neovim version:
Thank you