Closed dankamongmen closed 2 years ago
Confirmed that in Alacritty, pressing Escape twice at startup only results in a single Escape.
Confirmed that in Alacritty, pressing Escape twice at startup only results in a single Escape.
likewise in XTerm. bah!
process_escapes()
is returning -1, which is what we'd expect, since we're in a possible escape sequence...but we ought then be saying "hey i don't have any more input available, kick it upstairs".
right, so under Kitty we get the encoded sequence, and thus it is a complete sequence, which we translate into Escape. no such love from other terminals.
ok, I have a fix, but I'm wary of it. needs more testing.
yeah that "fix" is no good; it breaks kitty, and is in any case fatuously motivated. it brings me and my family great shame.
the real fix is tied up with #2647. we need to do one loop around the i/o tree when we hit the end of a possible escape sequence, in order to make sure it isn't completed there. but if we don't get good data on it immediately, kick it upstairs.
@CyanideForBreakfast reports in https://github.com/dankamongmen/libnotcurses-sys/issues/21 that we're not picking up a bare Escape when pressed as the first input. This does not appear to be the case for me in Kitty, but he's reporting Alacritty and XTerm. Either way, let's get this investigated.