mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-10 04:27:45 -05:00
csi: fix cursor request response; add 1, not 2
This commit is contained in:
parent
2fe7145aff
commit
7fb0c4b342
1 changed files with 3 additions and 2 deletions
5
csi.c
5
csi.c
|
|
@ -471,10 +471,11 @@ csi_dispatch(struct terminal *term, uint8_t final)
|
|||
/* u7 - cursor position query */
|
||||
/* TODO: we use 0-based position, while the xterm
|
||||
* terminfo says the receiver of the reply should
|
||||
* decrement, hence we must add 2 */
|
||||
* decrement, hence we must add 1 */
|
||||
char reply[64];
|
||||
snprintf(reply, sizeof(reply), "\x1b[%d;%dR",
|
||||
term->grid.cursor.row + 2, term->grid.cursor.col + 2);
|
||||
term->grid.cursor.row + 1,
|
||||
term->grid.cursor.col + 1);
|
||||
write(term->ptmx, reply, strlen(reply));
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue