• Benno Schulenberg's avatar
    suspension: prevent entering an invalid byte upon resume (with S-Lang) · 43a5c876
    Benno Schulenberg authored
    For some reason, when returning from suspension, SLang will produce
    either a clipped error code (0xFF instead of 0xFFFF, when returning
    from an externally induced suspension), or it will clip the code of
    first subsequent keystroke to a single byte (when returning from a
    normal, in-editor suspension: ^Z).
    
    Side-step this by ignoring the clipped error code, and by using an
    undefined control code as the first fake keystroke.  Ignoring the
    clipped error code is not possible when using a single-byte locale,
    otherwise the user would not be able to type the character with
    code 0xFF (although it could still be entered with Esc Esc 255).
    
    This fixes https://savannah.gnu.org/bugs/?51477.
    43a5c876
winio.c 111 KB