Pop keyboard stack if we crash in initialization
if we crash while detecting kitty keyboard support, we currently don't pop the keyboard state. since we set our desired state before detecting support, this could leave the terminal in an invalid state. now, we initialize kbdlevel to UINT_MAX before detection, so that in a crash, the pop always happens. we reset it at the end of interrogation, assuming we didn't load it from a query response. the downside is that a terminal which doesn't consume this sequence will get hit with it in a crash, but we're already crashing, so who cares? leaving the terminal in an invalid state, however, is very annoying.pull/2263/head
parent
5b5e97033d
commit
69c2ae3ba0
Loading…
Reference in New Issue