LibVT: Don't scroll to bottom for Ctrl/Alt/Shift

It's nice that we scroll the cursor into view when typing in a terminal
but it's not necessary when pressing only Ctrl, Alt of Shift.
This commit is contained in:
Andreas Kling 2019-11-23 15:59:16 +01:00
parent 09189e34e3
commit 5a84944dc8

View file

@ -244,7 +244,8 @@ void TerminalWidget::keydown_event(GKeyEvent& event)
write(m_ptm_fd, &ch, 1);
}
m_scrollbar->set_value(m_scrollbar->max());
if (event.key() != Key_Control && event.key() != Key_Alt && event.key() != Key_Shift)
m_scrollbar->set_value(m_scrollbar->max());
}
void TerminalWidget::paint_event(GPaintEvent& event)