summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin T. H. Sandsmark <martin.sandsmark@kde.org>2016-08-28 10:45:46 (GMT)
committerMartin T. H. Sandsmark <martin.sandsmark@kde.org>2016-08-28 15:02:34 (GMT)
commiteea5ecfc5ed93515afaae5b9b938154eeaaf0ba8 (patch)
tree1fdec9de2aceb62d3aec3b4fcf46eceecacef240
parent04dce67996a9318494c79c2617e3c88620e8e19e (diff)
Fix display sometimes randomly scrolling down
If another modifier (e. g. Meta) was pressed, Konsole interpreted it as the user typing something and helpfully scrolled to the bottom. REVIEW: 128786
-rw-r--r--src/SessionController.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/SessionController.cpp b/src/SessionController.cpp
index cacb51b..a1db8bc 100644
--- a/src/SessionController.cpp
+++ b/src/SessionController.cpp
@@ -224,17 +224,13 @@ void SessionController::trackOutput(QKeyEvent* event)
{
Q_ASSERT(_view->screenWindow());
- // jump to the end of the history buffer unless the key pressed
- // is one of the three main modifiers, as these are used to select
- // the selection mode (eg. Ctrl+Alt+<Left Click> for column/block selection)
- switch (event->key()) {
- case Qt::Key_Shift:
- case Qt::Key_Control:
- case Qt::Key_Alt:
- break;
- default:
- _view->screenWindow()->setTrackOutput(true);
+ // Only jump to the bottom if the user actually typed something in,
+ // not if the user e. g. just pressed a modifier.
+ if (event->text().isEmpty()) {
+ return;
}
+
+ _view->screenWindow()->setTrackOutput(true);
}
void SessionController::interactionHandler()
{