From b6b95f23e563211437e51322edc9118b63a3ca40 Mon Sep 17 00:00:00 2001 From: Stefan Tauner Date: Sun, 22 Dec 2024 02:38:42 +0100 Subject: [PATCH] Treat SOS and PM terminal escape sequences like APC SOS (Start of string) and PM (privacy message) are opening delimiters defined in ECMA-48 similar to APC. With this change they are treated exactly like APC, i.e., like fake OSC sequences that are ignored and not printed. Signed-off-by: Stefan Tauner --- terminal/terminal.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/terminal/terminal.c b/terminal/terminal.c index 2db81c9a..ad309436 100644 --- a/terminal/terminal.c +++ b/terminal/terminal.c @@ -4127,9 +4127,11 @@ static void term_out(Terminal *term, bool called_from_term_data) term->esc_args[0] = 0; term->esc_nargs = 1; break; + case 'X': /* SOS: Start of String */ + case '^': /* PM: privacy message */ case '_': /* APC: application program command */ - /* APC sequences are just a string, terminated by - * ST or (I've observed in practice) ^G. That is, + /* SOS, PM, and APC sequences are just a string, terminated by + * ST or (I've observed in practice for APC) ^G. That is, * they have the same termination convention as * OSC. So we handle them by going straight into * OSC_STRING state and setting a flag indicating