overseer.nvim
overseer.nvim copied to clipboard
bug: The scroll doesn't work with the toggleterm strategy when opening a preview
Neovim version (nvim -v)
NVIM v0.9.5
Operating system/version
macOS 14.2.1
Describe the bug
As I understand, if the terminal output hasn't filled the buffer yet, the scroll won't work. If you remove the delay in the output, the scroll works
What is the severity of this bug?
minor (annoyance)
Steps To Reproduce
- nvim -u repro.lua init.lua (init.lua attached to issue)
- source init.lua (execute file)
Expected Behavior
Auto-scroll activates as the buffer fills up
init.lua
local overseer = require('overseer')
local job = overseer.new_task({
cmd = 'for i in {0..99999}; do echo $i; sleep 0.1; done',
strategy = { 'toggleterm', open_on_start = false, }
})
job:subscribe('on_start', function()
overseer.open({
enter = false,
direction = 'bottom'
})
end)
job:start()
repro.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",
"akinsho/toggleterm.nvim",
{ "stevearc/dressing.nvim", config = true },
{
"stevearc/overseer.nvim",
config = function()
require("overseer").setup({
-- add your overseer config here
})
end,
},
-- add any other plugins here
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here
Additional context
It seems that this hack is affecting it https://github.com/stevearc/overseer.nvim/blob/4855aefcf335bbac71eea9c6a888958fb1ed1e1a/lua/overseer/util.lua#L141