When using custom headers with emojis (e.g., "👤 User "), parts of the header text are incorrectly highlighted with different colors instead of using the consistent
CopilotChatHeader highlight group.
Steps to Reproduce
- Configure custom headers with emojis:
require("CopilotChat").setup({
headers = {
user = "👤 User ",
assistant = "🤖 Assistant ",
tool = "🔧 Tool ",
},
})
- Open CopilotChat and start a conversation
- Observe the header text
Expected Behavior
The entire header text should use the CopilotChatHeader highlight group consistently.
Actual Behavior
Parts of the header text (e.g., "Us" in "👤 User") are highlighted with different colors (often orange/Function color), while other parts use the correct header color or remain
uncolored.

When using custom headers with emojis (e.g.,
"👤 User "), parts of the header text are incorrectly highlighted with different colors instead of using the consistentCopilotChatHeaderhighlight group.Steps to Reproduce
Expected Behavior
The entire header text should use the CopilotChatHeader highlight group consistently.
Actual Behavior
Parts of the header text (e.g., "Us" in "👤 User") are highlighted with different colors (often orange/Function color), while other parts use the correct header color or remain
uncolored.