[Bug]: set laststatus=3
+ lualine.nvim + smart-splits.nvim == flickering when switching windows #179
Open
Description
Similar Issues
- Before filing, I have searched for similar issues.
Neovim Version
NVIM v0.10.0-dev-2791+g99b3a068d
Build type: RelWithDebInfo
LuaJIT 2.1.1710088188
Run "nvim -V1 -v" for more info
Multiplexer Integration
tmux
Multiplexer Version
tmux 3.a
Steps to Reproduce
- Create a split and / up and down
Expected Behavior
No strobing on lualine. Note: No strobing / flickering happens when switching with simply j / k. Only smart-splits.nvim has this problem, it seems.
Actual Behavior
It flickers as you switch windows.
Minimal Configuration to Reproduce
-- 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", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
{
"nvim-lualine/lualine.nvim",
opts = true,
},
{
"mrjones2014/smart-splits.nvim",
config = function()
require("smart-splits").setup(
{
resize_mode = {
hooks = {
on_leave = require('bufresize').register,
},
},
}
)
vim.keymap.set(
"n",
"<C-j>",
require("smart-splits").move_cursor_down,
{desc="Jump to the window (or tmux pane) below."}
)
vim.keymap.set(
"n",
"<C-k>",
require("smart-splits").move_cursor_up,
{desc="Jump to the window (or tmux pane) above."}
)
end,
dependencies = { "kwkarlwang/bufresize.nvim" },
}
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd[[set laststatus=3]]
Additional Details and/or Screenshots
Flickering
2024-04-09.00-56-12.mp4
(uses and from the reproduction)
Working
2024-04-09.00-57-30.mp4
The same environment as before but with nmap <C-{J,K}> <C-W>{j,k}
to switch between the splits, instead. No flickering