From 731cda1adadfb42d86506db1fb1377edb90ada04 Mon Sep 17 00:00:00 2001 From: deuce <> Date: Sun, 15 Feb 2009 09:42:42 +0000 Subject: [PATCH] Add support for CSI pn G (Cursor Position Absolute) for setting the current column and leaving the row unchanged. --- src/conio/cterm.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/conio/cterm.c b/src/conio/cterm.c index 62f4925100..f5f0d02de8 100644 --- a/src/conio/cterm.c +++ b/src/conio/cterm.c @@ -731,6 +731,14 @@ void do_ansi(char *retbuf, size_t retsize, int *speed) i=1; gotoxy(1,i); break; + case 'G': + col=strtoul(cterm.escbuf+1,NULL,10); + if(col<1) + col=1; + if(col>cterm.width) + col=cterm.width; + gotoxy(col,wherey()); + break; case 'f': case 'H': row=1; -- GitLab