nvim-lualine / lualine.nvim

A blazing fast and easy to configure neovim statusline plugin written in pure lua.
MIT License
6.16k stars 465 forks source link

Bug: Using custom highlight group in a section's output causes the separator to be colored with wrong color #952

Open simplepad opened 1 year ago

simplepad commented 1 year ago

Self Checks

How to reproduce the problem

Use the config provided below

Expected behaviour

The separator should be colored with the theme-defined background color

Actual behaviour

The separator is colored with default background color image

Minimal config to reproduce the issue

-- Add new highlight group
vim.cmd[[hi MyHighlightGroup guifg=#ff966c]]

local function test_with_highlight()
    return [[%#MyHighlightGroup#Block with wrongly colored separator]]
end

local function test_without_highlight()
    return [[Block with correctly colored separator]]
end

require('lualine').setup {
    options = {
        theme = 'onedark',
    },
    tabline = {
        lualine_a = { test_with_highlight },
        lualine_b = { test_without_highlight },
    }
}

Additional information

sheldonleung commented 11 months ago

Same problem. But I'm using the build-in themes "powerline" in statusline. image

sheldonleung commented 11 months ago

Same problem. But I'm using the build-in themes "powerline" in statusline. image

I solved. I'm use "Windows Terminal" and change the config this way in "Defaults > Appearance". By the way, you can see the preview at the top of the window. Windows Terminal Version: 1.18.2822.0 image