1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-08 08:58:00 +00:00

Treat SOS and PM terminal escape sequences like APC

This is a cherry-pick of Stefan Tauner's patch from main, but without
my followup refactoring, since the refactoring seemed to me to have a
(small but easily avoidable) chance of introducing a bug in 0.83.

The only downside of the original patch is that it contains a variable
name telling a lie: 'osc_is_apc' should really read 'this isn't an OSC
but one of APC, SOS and PM'. But we don't actually treat those three
things differently, so the functionality is fine.

(cherry picked from commit b6b95f23e5)
This commit is contained in:
Simon Tatham 2024-12-26 11:40:38 +00:00
parent 98200d1bfe
commit 1e45199761

View File

@ -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