From 98f5aa6d65d2e3e9d9ad8b64ce252e01327a3895 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Thu, 20 Jan 2011 02:34:41 +0000 Subject: [PATCH] textport fixes for insertLine, tabTo. git-svn-id: svn://qnap.local/TwoTerm/trunk@2001 5590a31f-7b70-45f8-8c82-aa3a8e5f4507 --- cpp/Screen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/Screen.cpp b/cpp/Screen.cpp index e6835d2..d6d41fc 100644 --- a/cpp/Screen.cpp +++ b/cpp/Screen.cpp @@ -154,7 +154,7 @@ void Screen::tabTo(TextPort *textPort, unsigned xPos) _screen[cursor.y][x + textPort->frame.minX()] = clear; } - textPort->cursor.x += xPos; + textPort->cursor.x = xPos; if (textPort != &_port) _port.cursor = textPort->absoluteCursor(); _updates.push_back(_port.cursor); @@ -833,7 +833,7 @@ void Screen::deleteLine(TextPort *textPort, unsigned line) if (line >= frame.height()) return; // move all subsequent lines back by 1. - for (int y = line; y < frame.height() - 2; ++y) + for (int y = line; y < frame.height() - 1; ++y) { CharInfoIterator iter; CharInfoIterator end;