diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-06-24 17:03:19 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-06-24 17:03:19 +0000 |
| commit | 7fb0c4b34282e733d6dd0c16c53169ac69ebd5ba (patch) | |
| tree | 997853d6f6be96deaff06891244f5d3d50aaaec1 | |
| parent | scrolling region: wip (diff) | |
csi: fix cursor request response; add 1, not 2
| -rw-r--r-- | csi.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; } |
