Commit b78a3f75 authored by Kurt Hindenburg's avatar Kurt Hindenburg

Correct ANSI's 'delete char' to delete the last character in a line.

Patch provided by Alexandre Becoulet

BUG: 217669

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1119662
parent a1b12aca
......@@ -205,11 +205,11 @@ void Screen::deleteChars(int n)
if ( cuX >= screenLines[cuY].count() )
return;
if ( cuX+n >= screenLines[cuY].count() )
n = screenLines[cuY].count() - 1 - cuX;
if ( cuX+n > screenLines[cuY].count() )
n = screenLines[cuY].count() - cuX;
Q_ASSERT( n >= 0 );
Q_ASSERT( cuX+n < screenLines[cuY].count() );
Q_ASSERT( cuX+n <= screenLines[cuY].count() );
screenLines[cuY].remove(cuX,n);
}
......
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