Incomplete support of ConEmu's OSC 9;4 sequences #13640

Open
opened 2026-01-31 03:48:08 +00:00 by claunia · 0 comments
Owner

Originally created by @chausner on GitHub (Apr 26, 2021).

#8055 implemented the ConEmu-specific VT sequence for displaying progress bars in the Windows task bar. According to https://conemu.github.io/en/AnsiEscapeCodes.html#ConEmu_specific_OSC, the progress value number in the sequence is optional when st is set to 2 or 4 but Windows Terminal currently does not recognize these sequences. For example:

> python
print("\x1b]9;4;2;\x1b\\")

switches the progress state to "Error" in ConEmu but does not have any effect in Windows Terminal.

Even though it is not explicitly written in the documentation linked above, ConEmu also allows leaving out the progress value when pr is set to values other than 2 and 4. This makes sense since for clearing the progress with pr = 0 or switching to indeterminate state pr = 3, the progress value does not have any meaning anyway.

I suggest to adjust the implementation in Windows Terminal to properly recognize sequences where the pr value has been left out in order to be compatible with ConEmu. The expected behaviour in this case would be to just switch the progress state but leave the progress value at the previously set value.

/cc @DHowett

Originally created by @chausner on GitHub (Apr 26, 2021). #8055 implemented the ConEmu-specific VT sequence for displaying progress bars in the Windows task bar. According to https://conemu.github.io/en/AnsiEscapeCodes.html#ConEmu_specific_OSC, the progress value number in the sequence is optional when `st` is set to 2 or 4 but Windows Terminal currently does not recognize these sequences. For example: ```python > python print("\x1b]9;4;2;\x1b\\") ``` switches the progress state to "Error" in ConEmu but does not have any effect in Windows Terminal. Even though it is not explicitly written in the documentation linked above, ConEmu also allows leaving out the progress value when `pr` is set to values other than 2 and 4. This makes sense since for clearing the progress with `pr = 0` or switching to indeterminate state `pr = 3`, the progress value does not have any meaning anyway. I suggest to adjust the implementation in Windows Terminal to properly recognize sequences where the `pr` value has been left out in order to be compatible with ConEmu. The expected behaviour in this case would be to just switch the progress state but leave the progress value at the previously set value. /cc @DHowett
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#13640