[Bug]: Text duplication and ghosting when using interactive CLI tools with CJK characters
Describe the bug
When running interactive CLI tools (specifically Gemini CLI) inside the integrated terminal, the output lines are duplicated and stacked infinitely. This occurs whenever a character is typed or a screen refresh is triggered. The issue persists even in a clean CMD environment without any shell customizers like Oh My Posh or Clink.
To Reproduce
- Configure an integrated terminal profile with
cmd.exe on Windows.
- Run an interactive CLI tool that utilizes ANSI escape sequences for in-place UI updates.
- Input CJK characters (e.g., "嗨").
- The terminal outputs duplicate lines instead of refreshing the current line, leading to a "text explosion" effect.
Expected behavior
The terminal should correctly interpret \r (carriage return) or ANSI cursor movement sequences (e.g., �[1G) to refresh the current line in-place.
Actual behavior
The terminal seems to treat line-refresh commands as line-feed commands, causing the UI and previous prompts to repeat vertically.
Screenshots
[Insert your screenshot here showing the duplicated "嗨" and Gemini CLI responses]
Environment
- OS: Windows 11
- Obsidian Version: 1.11.7
- Plugin Version: 3.21.0
- Terminal Profile Settings:
"win32IntegratedDefault": {
"args": [],
"executable": "C:\\Windows\\System32\\cmd.exe",
"followTheme": true,
"name": "",
"platforms": {
"win32": true
},
"pythonExecutable": "python3",
"restoreHistory": false,
"rightClickAction": "copyPaste",
"successExitCodes": [
"0",
"SIGINT",
"SIGTERM"
],
"terminalOptions": {
"documentOverride": null
},
"type": "integrated",
"useWin32Conhost": true
}
◇ Ready (Obsidian .html
[Bug]: Text duplication and ghosting when using interactive CLI tools with CJK characters
Describe the bug
When running interactive CLI tools (specifically Gemini CLI) inside the integrated terminal, the output lines are duplicated and stacked infinitely. This occurs whenever a character is typed or a screen refresh is triggered. The issue persists even in a clean CMD environment without any shell customizers like Oh My Posh or Clink.
To Reproduce
cmd.exeon Windows.Expected behavior
The terminal should correctly interpret
\r(carriage return) or ANSI cursor movement sequences (e.g.,�[1G) to refresh the current line in-place.Actual behavior
The terminal seems to treat line-refresh commands as line-feed commands, causing the UI and previous prompts to repeat vertically.
Screenshots
[Insert your screenshot here showing the duplicated "嗨" and Gemini CLI responses]
Environment
◇ Ready (Obsidian .html