Maximus5 / ConEmu

Customizable Windows terminal with tabs, splits, quake-style, hotkeys and more
https://conemu.github.io/
BSD 3-Clause "New" or "Revised" License
8.5k stars 570 forks source link

The lines containing Chinese characters display strange color blocks when running a CLI app based on Python and prompt_toolkit in ConEmu #2573

Open kkhaveabigdream opened 4 months ago

kkhaveabigdream commented 4 months ago

Versions

ConEmu build: 230724 x64 OS version: Windows 11 Professional Tranditional Chinese Edition x64 Used shell version : cmder 1.3.24.236

Problem description

When running a Python CLI app based on prompt_toolkit in cmder, there are strange color blocks in the UI. It appears to be a problem with Chinese character parsing, as lines containing Chinese characters render with color blocks exceeding their expected length. However, this issue does not occur in PowerShell

Actual results

4

Expected results

6

result in the [RealConsole] by Ctrl-Win-Alt-Space

5

kkhaveabigdream commented 4 months ago

Any suggestions? I need help :(

kkhaveabigdream commented 3 months ago

By unchecking the TrueColor mode, I solved the problem. It can also be solved by setting the bg color as ANSI color.

Maximus5 commented 3 months ago

Could you attach screen dump? (SysMenu -> Debug -> Dump screen)

kkhaveabigdream commented 3 months ago

dump.zip @Maximus5

kkhaveabigdream commented 3 months ago

@Maximus5 Additionally, there is another issue: there is a chance that when I exit my program, characters from the exit dialog box may remain, which shouldn't happen. dump3 Error result when app exits: dump2 Expected result when app exits: result

kkhaveabigdream commented 3 months ago

dump2.zip