mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Allow BEL to terminate OSC sequences during setup.
This is a partial cherry-pick of commit de66b0313a
from main,
which allows all the forms of OSC sequence termination to apply in the
preliminary states as well as OSC_STRING.
The reporting user only mentioned the case of OSC 112 BEL, and not the
various forms of ST. So the former is actually known to be occurring
in the wild, and is also the least complicated part of the full patch
on main. Therefore I think this part is worthwhile and reasonably safe
to cherry-pick to 0.77 just before a release, whereas I'd be
uncomfortable making the rest of the changes at this late stage.
This commit is contained in:
parent
ac3ebcc827
commit
cc10b68d31
@ -3822,6 +3822,19 @@ static void term_out(Terminal *term, bool called_from_term_data)
|
||||
}
|
||||
break;
|
||||
case '\007': { /* BEL: Bell */
|
||||
if (term->termstate == SEEN_OSC ||
|
||||
term->termstate == SEEN_OSC_W) {
|
||||
/*
|
||||
* In an OSC context, BEL is one of the ways to terminate
|
||||
* the whole sequence. We process it as such even if we
|
||||
* haven't got into the final OSC_STRING state yet, so that
|
||||
* OSC sequences without a string will be handled cleanly.
|
||||
*/
|
||||
do_osc(term);
|
||||
term->termstate = TOPLEVEL;
|
||||
break;
|
||||
}
|
||||
|
||||
struct beeptime *newbeep;
|
||||
unsigned long ticks;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user