Properly implement the "Action after paste" feature

Scroll to end only when data is not from pasting

Fixes https://github.com/lxqt/qterminal/issues/43
Fixes https://github.com/lxqt/qterminal/issues/741
This commit is contained in:
Chih-Hsuan Yen
2020-11-30 02:11:09 +08:00
parent 5b1a15bef8
commit 71f8049760
8 changed files with 38 additions and 41 deletions
+3 -3
View File
@@ -174,8 +174,8 @@ void Session::addView(TerminalDisplay * widget)
if ( _emulation != nullptr ) {
// connect emulation - view signals and slots
connect( widget , SIGNAL(keyPressedSignal(QKeyEvent *)) , _emulation ,
SLOT(sendKeyEvent(QKeyEvent *)) );
connect( widget , &TerminalDisplay::keyPressedSignal, _emulation ,
&Emulation::sendKeyEvent);
connect( widget , SIGNAL(mouseSignal(int,int,int,int)) , _emulation ,
SLOT(sendMouseEvent(int,int,int,int)) );
connect( widget , SIGNAL(sendStringToEmu(const char *)) , _emulation ,
@@ -567,7 +567,7 @@ void Session::sendText(const QString & text) const
void Session::sendKeyEvent(QKeyEvent* e) const
{
_emulation->sendKeyEvent(e);
_emulation->sendKeyEvent(e, false);
}
Session::~Session()