Commit a83983e5 authored by Robert Knight's avatar Robert Knight

Fix jumping to end of output if new output appears while keyboard scrolling...

Fix jumping to end of output if new output appears while keyboard scrolling keys are being used.  BUG:148505

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=696958
parent 18de140c
......@@ -2257,6 +2257,9 @@ void TerminalDisplay::pasteSelection()
void TerminalDisplay::keyPressEvent( QKeyEvent* event )
{
bool emitKeyPressSignal = true;
// XonXoff flow control
if (event->modifiers() & Qt::ControlModifier)
{
if ( event->key() == Qt::Key_S )
......@@ -2265,6 +2268,7 @@ void TerminalDisplay::keyPressEvent( QKeyEvent* event )
emit flowControlKeyPressed(false /*output enabled*/);
}
// Keyboard-based navigation
if ( event->modifiers() == Qt::ShiftModifier )
{
bool update = true;
......@@ -2291,9 +2295,12 @@ void TerminalDisplay::keyPressEvent( QKeyEvent* event )
if ( update )
{
_screenWindow->setTrackOutput( _screenWindow->atEndOfOutput() );
updateLineProperties();
updateImage();
// do not send key press to terminal
emitKeyPressSignal = false;
}
}
......@@ -2309,7 +2316,8 @@ void TerminalDisplay::keyPressEvent( QKeyEvent* event )
_cursorBlinking = false;
}
emit keyPressedSignal(event);
if ( emitKeyPressSignal )
emit keyPressedSignal(event);
event->accept();
}
......
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