executeQuery writes a terminal query to the program output. Queries expect a reply on p.input, so when input is disabled the query is skipped: the program cannot read the response, and the terminal's reply would leak into the shell once the program exits (#1590). This covers every query that expect
(seq string)
| 1365 | // position reports, clipboard reads, and terminal version and termcap |
| 1366 | // queries. |
| 1367 | func (p *Program) executeQuery(seq string) { |
| 1368 | if p.disableInput { |
| 1369 | return |
| 1370 | } |
| 1371 | p.noteQuery() |
| 1372 | p.execute(seq) |
| 1373 | } |
| 1374 | |
| 1375 | // noteQuery records that a terminal query is about to be written, so its |
| 1376 | // reply can be read before the terminal is handed back. See |