Commit 86b89477 authored by Robert Knight's avatar Robert Knight

Attempt #2 to fix assert failure when deleting chars.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=696791
parent 503fdd02
......@@ -279,7 +279,16 @@ void Screen::eraseChars(int n)
void Screen::deleteChars(int n)
{
if (n == 0) n = 1; // Default
Q_ASSERT( n >= 0 );
// always delete at least one char
if (n == 0)
n = 1;
// if cursor is beyond the end of the line there is nothing to do
if ( cuX >= screenLines[cuY].count() )
return;
if ( cuX+n >= screenLines[cuY].count() )
n = screenLines[cuY].count() - 1 - cuX;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment