oh-my-posh: Strange duplicate character in Visual Studio Code
Code of Conduct
- I agree to follow this project’s Code of Conduct
What happened?
In visual studio code, the first two characters will automatically duplicate and can’t be deleted which is super annoying.
But in windows terminal, everything is fine.

Theme
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"background": "#c386f1",
"foreground": "#ffffff",
"leading_diamond": "\ue0b6",
"properties": {
"template": " {{ if .SSHSession }}\uf817 {{ end }}{{ .UserName }}@{{ .HostName }} "
},
"style": "diamond",
"trailing_diamond": "\ue0b0",
"type": "session"
},
{
"background": "#ff479c",
"foreground": "#ffffff",
"powerline_symbol": "\ue0b0",
"properties": {
"style": "folder",
"template": " \ue5ff {{ .Path }} "
},
"style": "powerline",
"type": "path"
},
{
"background": "#fffb38",
"foreground": "#193549",
"powerline_symbol": "\ue0b0",
"properties": {
"fetch_stash_count": true,
"fetch_upstream_icon": true,
"template": " {{ .HEAD }} {{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}} \uf692 {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} \uf1bb {{ .WorktreeCount }}{{ end }} "
},
"style": "powerline",
"type": "git"
},
{
"background": "#6CA35E",
"foreground": "#ffffff",
"powerline_symbol": "\ue0b0",
"properties": {
"fetch_version": false,
"template": " \ue718{{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }} "
},
"style": "powerline",
"type": "node"
},
{
"background": "#ffff66",
"foreground": "#ffffff",
"powerline_symbol": "\ue0b0",
"properties": {
"template": " \uf0e7 "
},
"style": "powerline",
"type": "root"
},
{
"background": "#0077c2",
"foreground": "#ffffff",
"powerline_symbol": "\ue0b0",
"properties": {
"template": " PE\u2197\ufe0fKO\u2198\ufe0f "
},
"style": "powerline",
"type": "text"
},
{
"background": "#f68038",
"background_templates": [
"{{ if gt .Code 0 }}#f1184c{{ end }}"
],
"foreground": "#ffffff",
"powerline_symbol": "\ue0b0",
"properties": {
"always_enabled": true,
"template": " \uf60e "
},
"style": "diamond",
"trailing_diamond": "\ue0b4",
"type": "exit"
}
],
"type": "prompt"
}
],
"console_title": true,
"console_title_style": "folder",
"final_space": true,
"version": 1
}
What OS are you seeing the problem on?
Windows
Which shell are you using?
powershell
Log output
Version: 7.16.2
Segments:
ConsoleTitle(false) - 0 ms -
session(true) - 0 ms - misaka00251@251-R7000p
path(true) - 0 ms - ~
shell(true) - 0 ms - uni
text(true) - 0 ms - no config
exit(true) - 0 ms -
Run duration: 3.0048ms
Cache path: C:\Users\misaka00251\AppData\Local/oh-my-posh
Logs:
2022/02/12 13:31:04 Args duration: 537.4µs, args:
2022/02/12 13:31:04 Args duration: 0s, args:
2022/02/12 13:31:04 Args duration: 0s, args:
2022/02/12 13:31:04 Shell duration: 0s, args:
2022/02/12 13:31:04 debug: Getenv
2022/02/12 13:31:04 Getenv duration: 0s, args: OMP_CACHE_DISABLED
2022/02/12 13:31:04 debug: Pwd
C:\Users\misaka00251
2022/02/12 13:31:04 Pwd duration: 0s, args:
2022/02/12 13:31:04 debug: Home
C:\Users\misaka00251
2022/02/12 13:31:04 PathSeperator duration: 0s, args:
2022/02/12 13:31:04 PathSeperator duration: 0s, args:
2022/02/12 13:31:04 debug: Pwd
C:\Users\misaka00251
2022/02/12 13:31:04 Pwd duration: 0s, args:
2022/02/12 13:31:04 debug: Home
C:\Users\misaka00251
2022/02/12 13:31:04 debug: Getenv
2022/02/12 13:31:04 Getenv duration: 0s, args: SSH_CONNECTION
2022/02/12 13:31:04 debug: Getenv
2022/02/12 13:31:04 Getenv duration: 0s, args: SSH_CLIENT
2022/02/12 13:31:04 Root duration: 0s, args:
2022/02/12 13:31:04 Shell duration: 0s, args:
2022/02/12 13:31:04 ErrorCode duration: 0s, args:
2022/02/12 13:31:04 IsWsl duration: 0s, args:
2022/02/12 13:31:04 debug: Pwd
C:\Users\misaka00251
2022/02/12 13:31:04 Pwd duration: 0s, args:
2022/02/12 13:31:04 debug: Home
C:\Users\misaka00251
2022/02/12 13:31:04 PathSeperator duration: 0s, args:
2022/02/12 13:31:04 PathSeperator duration: 0s, args:
2022/02/12 13:31:04 User duration: 0s, args:
2022/02/12 13:31:04 Host duration: 0s, args:
2022/02/12 13:31:04 GOOS duration: 0s, args:
2022/02/12 13:31:04 TemplateCache duration: 0s, args:
2022/02/12 13:31:04 debug: Pwd
C:\Users\misaka00251
2022/02/12 13:31:04 Pwd duration: 0s, args:
2022/02/12 13:31:04 debug: Home
C:\Users\misaka00251
2022/02/12 13:31:04 debug: Pwd
C:\Users\misaka00251
2022/02/12 13:31:04 Pwd duration: 0s, args:
2022/02/12 13:31:04 Args duration: 0s, args:
2022/02/12 13:31:04 debug: Pwd
C:\Users\misaka00251
2022/02/12 13:31:04 Pwd duration: 0s, args:
2022/02/12 13:31:04 debug: Home
C:\Users\misaka00251
2022/02/12 13:31:04 GOOS duration: 0s, args:
2022/02/12 13:31:04 GOOS duration: 0s, args:
2022/02/12 13:31:04 PathSeperator duration: 0s, args:
2022/02/12 13:31:04 PathSeperator duration: 0s, args:
2022/02/12 13:31:04 PathSeperator duration: 0s, args:
2022/02/12 13:31:04 GOOS duration: 0s, args:
2022/02/12 13:31:04 IsWsl duration: 0s, args:
2022/02/12 13:31:04 StackCount duration: 0s, args:
2022/02/12 13:31:04 TemplateCache duration: 0s, args:
2022/02/12 13:31:04 debug: Pwd
C:\Users\misaka00251
2022/02/12 13:31:04 Pwd duration: 0s, args:
2022/02/12 13:31:04 debug: Home
C:\Users\misaka00251
2022/02/12 13:31:04 Shell duration: 0s, args:
2022/02/12 13:31:04 TemplateCache duration: 0s, args:
2022/02/12 13:31:04 debug: Pwd
C:\Users\misaka00251
2022/02/12 13:31:04 Pwd duration: 0s, args:
2022/02/12 13:31:04 debug: Home
C:\Users\misaka00251
2022/02/12 13:31:04 TemplateCache duration: 0s, args:
2022/02/12 13:31:04 debug: Pwd
C:\Users\misaka00251
2022/02/12 13:31:04 Pwd duration: 0s, args:
2022/02/12 13:31:04 debug: Home
C:\Users\misaka00251
2022/02/12 13:31:04 ErrorCode duration: 0s, args:
2022/02/12 13:31:04 TemplateCache duration: 0s, args:
2022/02/12 13:31:04 TemplateCache duration: 0s, args:
2022/02/12 13:31:04 TemplateCache duration: 0s, args:
2022/02/12 13:31:04 debug: Getenv
C:\Users\misaka00251\AppData\Local
2022/02/12 13:31:04 Getenv duration: 0s, args: LOCALAPPDATA
2022/02/12 13:31:04 CachePath duration: 26.1µs, args:
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 18 (8 by maintainers)
Sure! vscode/issues/143103 if anybody is facing the same problem.
I found the problem in this block:
\ufe0fin Unicode is called a variation selector. Without the variation selector the character still renders fine, but there’s no additional information about presentation.But strangely it only happens in VSCode.