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)
| 1382 | // position reports, clipboard reads, and terminal version and termcap |
| 1383 | // queries. |
| 1384 | func (p *Program) executeQuery(seq string) { |
| 1385 | if p.disableInput { |
| 1386 | return |
| 1387 | } |
| 1388 | p.noteQuery() |
| 1389 | p.execute(seq) |
| 1390 | } |
| 1391 | |
| 1392 | // noteQuery records that a terminal query is about to be written, so its |
| 1393 | // reply can be read before the terminal is handed back. See |