bug: Scrolling always moves the cursor to the last line
MariaSolOs opened this issue · comments
Neovim version (nvim -v)
v0.10.0-dev-1260+g9ce162383
Operating system/version
macOS Sonoma 14.0
Describe the bug
When running zz
inside the task list window to center the cursor line, the centering is reset and the line is pinned to the bottom.
Here's a video of this behavior:
Screen.Recording.2023-10-01.at.8.41.44.PM.mov
Steps To Reproduce
- Install the plugin using the configuration provided below.
- Run a task that generates a substantial amount of output.
- Run
OverseerOpen
. - Run
zz
inside the task list and notice the strange cursor movement.
Expected Behavior
For commands like zz
inside the task list window to work as expected.
Minimal example file
No response
Minimal init.lua
-- DO NOT change the paths and don't remove the colorscheme
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 = {
"folke/tokyonight.nvim",
{ "stevearc/dressing.nvim", config = true },
{
"stevearc/overseer.nvim",
config = function()
require("overseer").setup({
-- add your overseer config here
task_list = {
default_detail = 3,
direction = 'bottom'
}
})
end,
},
-- add any other plugins here
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here
Additional context
No response
Interestingly, I couldn't quite get a repro for this. I took a guess at the issue and what might fix it; could you give the attached PR a try? If it doesn't work, I may need more information about the tasks that you have running when this happens.
@stevearc Your PR fixes it! And again sorry for the bad repro :(
No worries, with something like this it's hard to nail it down exactly