From 175ce78271ce0860c22b9c5098797a6a07c1d2fc Mon Sep 17 00:00:00 2001 From: Ali Gholami Rudi Date: Mon, 13 Jul 2009 15:10:34 +0430 Subject: [PATCH] vt102: implement G and X CSI escapes --- vt102.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vt102.c b/vt102.c index 7787296..825d686 100644 --- a/vt102.c +++ b/vt102.c @@ -318,11 +318,15 @@ static void csiseq(void) case 'n': /* DSR device status report */ csiseq_dsr(args[0]); break; + case 'G': /* CHA move cursor to column in current row */ + advance(0, MAX(0, args[0] - 1) - col, 0); + break; + case 'X': /* ECH erase characters on current line */ + kill_chars(col, MAX(col + MAX(1, args[0]), pad_cols())); + break; case '[': /* IGN ignored control sequence */ case 'E': /* CNL move cursor down and to column 1 */ case 'F': /* CPL move cursor up and to column 1 */ - case 'G': /* CHA move cursor to column in current row */ - case 'X': /* ECH erase characters on current line */ case 'g': /* TBC clear tab stop (CSI 3 g = clear all stops) */ case 'q': /* DECLL set keyboard LEDs */ case 's': /* CUPSV save cursor position */ -- 2.11.4.GIT