diff options
| author | Luke Smith <luke@lukesmith.xyz> | 2026-04-10 11:10:30 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-10 11:10:30 -0400 |
| commit | 48b8ee6e181643800fe83353ec554f503020a8fa (patch) | |
| tree | b0b1e31c8fdca531ae63ed3a4b85485f25a4f432 /st.c | |
| parent | 62ebf677d3ad79e0596ff610127df5db034cd234 (diff) | |
| parent | 2c5b9ac2a1d14d97ef49fc6bf7580616bc2e90bf (diff) | |
Fix "Did not detect DSR response"
Diffstat (limited to 'st.c')
| -rw-r--r-- | st.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -1852,11 +1852,18 @@ csihandle(void) case 'm': /* SGR -- Terminal attribute (color) */ tsetattr(csiescseq.arg, csiescseq.narg); break; - case 'n': /* DSR – Device Status Report (cursor position) */ - if (csiescseq.arg[0] == 6) { + case 'n': /* DSR -- Device Status Report */ + switch (csiescseq.arg[0]) { + case 5: /* Status Report "OK" `0n` */ + ttywrite("\033[0n", sizeof("\033[0n") - 1, 0); + break; + case 6: /* Report Cursor Position (CPR) "<row>;<column>R" */ len = snprintf(buf, sizeof(buf), "\033[%i;%iR", term.c.y+1, term.c.x+1); ttywrite(buf, len, 0); + break; + default: + goto unknown; } break; case 'r': /* DECSTBM -- Set Scrolling Region */ |
