-
-
Notifications
You must be signed in to change notification settings - Fork 524
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Self Checks
- I'm using the latest lualine.
- I didn't find the issue in existing issues or PRs.
How to reproduce the problem
- Open Neovim inside a git repo
- Open any file (suppose
first.txt
) - Open a different file (suppose
second.txt
) - Create a split such that the window containing
second.txt
is inactive
Expected behaviour
The git branch component should not disappear.
Actual behaviour
The git branch component disappears.

Note: The git branch component does not disappear when the first file opened is inactive, but will disappear when any further files opened are inactive.
Minimal config to reproduce the issue
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
-- Lualine configuration
require("lazy").setup({
spec = {
{
'nvim-lualine/lualine.nvim',
config = {
sections = {
lualine_a = { 'filename', 'branch' },
lualine_b = {},
lualine_c = {},
lualine_x = {},
lualine_y = {},
lualine_z = {},
},
inactive_sections = {
lualine_a = { 'filename', 'branch' },
lualine_b = {},
lualine_c = {},
lualine_x = {},
lualine_y = {},
lualine_z = {},
},
},
},
},
})
Additional information
I am willing to take on this issue. I will look into why this behavior occurs.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working