Also report -2 in query response
This commit is contained in:
parent
14741b1b29
commit
518e06cfa4
3 changed files with 9 additions and 8 deletions
|
|
@ -92,13 +92,14 @@ protocol by sending the escape code::
|
|||
|
||||
In this case a supporting terminal must reply with::
|
||||
|
||||
CSI > -1;1;2;3 TRAILER
|
||||
CSI > -2;-1;1;2;3 TRAILER
|
||||
|
||||
Here, the list of numbers indicates the cursor shapes the terminal supports and
|
||||
can be any subset of the above. No numbers indicates the protocol is not
|
||||
supported. To avoid having to wait with a timeout for a response from the
|
||||
terminal, the client should send this query code immediately followed by
|
||||
a request for the `primary device attributes <https://vt100.net/docs/vt510-rm/DA1.html>`_.
|
||||
Here, the list of numbers indicates the cursor shapes and other operations
|
||||
the terminal supports and can be any subset of the above. No numbers
|
||||
indicates the protocol is not supported. To avoid having to wait with a
|
||||
timeout for a response from the terminal, the client should send this
|
||||
query code immediately followed by a request for the
|
||||
`primary device attributes <https://vt100.net/docs/vt510-rm/DA1.html>`_.
|
||||
If the terminal responds with an answer for the device attributes without
|
||||
an answer for the *query* the terminal emulator does not support this protocol at all.
|
||||
|
||||
|
|
|
|||
|
|
@ -2871,7 +2871,7 @@ screen_multi_cursor(Screen *self, int queried_shape, int *params, unsigned num_p
|
|||
// printf("%d;", queried_shape); for (unsigned i = 0; i < num_params; i++) {printf("%d:", params[i]);} printf("\n");
|
||||
if (!num_params) {
|
||||
if (params == NULL) {
|
||||
write_escape_code_to_child(self, ESC_CSI, ">-1;1;2;3 q");
|
||||
write_escape_code_to_child(self, ESC_CSI, ">-2;-1;1;2;3 q");
|
||||
} else if (queried_shape == -2) {
|
||||
size_t sz = self->extra_cursors.count * 32 + 64;
|
||||
RAII_ALLOC(char, buf, malloc(sz)); sz -= 4;
|
||||
|
|
|
|||
|
|
@ -1595,7 +1595,7 @@ def test_multi_cursors(self):
|
|||
c = s.callbacks
|
||||
# Test detection
|
||||
parse_bytes(s, b'\x1b[> q') # ]
|
||||
self.ae(c.wtcbuf, b'\x1b[>-1;1;2;3 q') # ]
|
||||
self.ae(c.wtcbuf, b'\x1b[>-2;-1;1;2;3 q') # ]
|
||||
|
||||
def current() -> dict[int, tuple[int, int]]:
|
||||
ans = {}
|
||||
|
|
|
|||
Loading…
Reference in a new issue