Subject: Re: discard_input_tty does not discard pending input, resulting in garbage inserted into the buffer

From: Platon Pronko <[email-masked]>
Date: Wed, 13 Mar 2019 11:04:28 +0300

Found two problems with current workarounds.

1. Simply reading and discarding events before xterm--query call still leaves small timing window while single typed character breaks response parsing and garbage still ends up in the buffer.

2. Thus async querying is prefererrable, and it works most of the time, but sometimes "65;5403;1c" ends up in input buffer (even if no characters are typed at all).