lualine.nvim icon indicating copy to clipboard operation
lualine.nvim copied to clipboard

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

Open simplepad opened this issue 2 years ago • 2 comments

Self Checks

  • [x] I'm using the latest lualine.
  • [x] I didn't find the issue in existing issues or PRs.

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

simplepad avatar Jan 29 '23 23:01 simplepad

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

sheldonleung avatar Nov 06 '23 03:11 sheldonleung

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

sheldonleung avatar Nov 08 '23 07:11 sheldonleung