diff options
| -rw-r--r-- | st.c | 13 |
1 files changed, 10 insertions, 3 deletions
| @@ -1769,11 +1769,18 @@ csihandle(void) | |||
| 1769 | case 'm': /* SGR -- Terminal attribute (color) */ | 1769 | case 'm': /* SGR -- Terminal attribute (color) */ |
| 1770 | tsetattr(csiescseq.arg, csiescseq.narg); | 1770 | tsetattr(csiescseq.arg, csiescseq.narg); |
| 1771 | break; | 1771 | break; |
| 1772 | case 'n': /* DSR – Device Status Report (cursor position) */ | 1772 | case 'n': /* DSR -- Device Status Report */ |
| 1773 | if (csiescseq.arg[0] == 6) { | 1773 | switch (csiescseq.arg[0]) { |
| 1774 | case 5: /* Status Report "OK" `0n` */ | ||
| 1775 | ttywrite("\033[0n", sizeof("\033[0n") - 1, 0); | ||
| 1776 | break; | ||
| 1777 | case 6: /* Report Cursor Position (CPR) "<row>;<column>R" */ | ||
| 1774 | len = snprintf(buf, sizeof(buf), "\033[%i;%iR", | 1778 | len = snprintf(buf, sizeof(buf), "\033[%i;%iR", |
| 1775 | term.c.y+1, term.c.x+1); | 1779 | term.c.y+1, term.c.x+1); |
| 1776 | ttywrite(buf, len, 0); | 1780 | ttywrite(buf, len, 0); |
| 1781 | break; | ||
| 1782 | default: | ||
| 1783 | goto unknown; | ||
| 1777 | } | 1784 | } |
| 1778 | break; | 1785 | break; |
| 1779 | case 'r': /* DECSTBM -- Set Scrolling Region */ | 1786 | case 'r': /* DECSTBM -- Set Scrolling Region */ |
