-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Description
Windows 10 version 1903, build 10.0.18362.295. Alacritty master.
Using Alacritty as the terminal (since it supports bold and italic text rendering), italic doesn’t work, because it seems to gets swallowed by ConPTY. alacritty/alacritty#2745 has some discussion.
Steps to reproduce
Run the following in Bash or similar under Alacritty, with the enable_experimental_conpty_backend setting enabled:
echo -e 'Normal, \x1b[1mbold\x1b[22m, \x1b[3mitalic\x1b[23m, \x1b[1;3mbold italic\x1b[22;23m'(If you don’t have that setting enabled, it’ll use WinPTY which also doesn’t pass italics through, but that’s irrelevant here.)
Expected behavior
Output like this:
Normal, bold, italic, bold italic
Actual behavior
Italics don’t occur:
Normal, bold, italic, bold italic
Further, when I insert logging into Alacritty’s csi_dispatch method, to observe what SGR codes it’s actually hearing about and applying, I see that the 3 (italic) and 23 (stop italic) have been swallowed, presumably by ConPTY, and Alacritty never saw them.
(ConPTY also modifies the CSI [ 1 m bold code to add another SGR code to change to the high-intensity colour. I still haven’t decided how I feel about that!)
I don’t know much about how these things work, so I don’t know if this is normal, but I was caught by surprise that ConPTY was apparently rendering things before they ever got to Alacritty, so that terminals are limited in what they can implement by what ConPTY implements. I expected it to pass everything through untouched, or at least to pass unknown things through rather than swallowing them.