From dbdd0d33cdfcb1a179538495ba16601b77921534 Mon Sep 17 00:00:00 2001 From: Keith Winstein Date: Sun, 14 Aug 2011 02:02:24 -0400 Subject: [PATCH] Correct treatment of erase character with repeat --- terminalfunctions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terminalfunctions.cpp b/terminalfunctions.cpp index ebcb581..e9febdc 100644 --- a/terminalfunctions.cpp +++ b/terminalfunctions.cpp @@ -434,7 +434,7 @@ static Function func_CSI_HPA( CSI, "\x60", CSI_HPA ); /* ECMA-48 name: HPA */ void CSI_ECH( Framebuffer *fb, Dispatcher *dispatch ) { int num = dispatch->getparam( 0, 1 ); - int limit = fb->ds.get_cursor_col() + num; + int limit = fb->ds.get_cursor_col() + num - 1; if ( limit >= fb->ds.get_width() ) { limit = fb->ds.get_width() - 1; }