Isolated algorithmic improvements.

* Fix inefficient STL use around Parser::UTF8Parser.
* Reduce typeid() usage, change some of it to a virtual method
* Do multiple-line scrolls as a single move
This commit is contained in:
John Hood
2014-05-10 15:25:40 -04:00
parent 3fa42cb8bb
commit 8fdcdc88cd
11 changed files with 89 additions and 63 deletions
+2 -6
View File
@@ -441,9 +441,7 @@ static void CSI_IL( Framebuffer *fb, Dispatcher *dispatch )
{
int lines = dispatch->getparam( 0, 1 );
for ( int i = 0; i < lines; i++ ) {
fb->insert_line( fb->ds.get_cursor_row() );
}
fb->insert_line( fb->ds.get_cursor_row(), lines );
/* vt220 manual and Ecma-48 say to move to first column */
/* but xterm and gnome-terminal don't */
@@ -457,9 +455,7 @@ static void CSI_DL( Framebuffer *fb, Dispatcher *dispatch )
{
int lines = dispatch->getparam( 0, 1 );
for ( int i = 0; i < lines; i++ ) {
fb->delete_line( fb->ds.get_cursor_row() );
}
fb->delete_line( fb->ds.get_cursor_row(), lines );
/* same story -- xterm and gnome-terminal don't
move to first column */