summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAhmad Samir <[email protected]>2018-12-24 20:19:19 -0500
committerKurt Hindenburg <[email protected]>2018-12-24 20:42:37 -0500
commitb545a812e3bf74157387fd60b61f6e2146723834 (patch)
treeb84afe30e74b04adfdf8d8c5caf34921d780bbd3
parent6a759670ac6a8fecd5142dd0d1f79b4b36a22721 (diff)
Don't change alternate scrolling state after calling reset()
Summary: Alternate Scrolling shouldn't be reset when calling resetModes(), this is to maintain the profile alternate scrolling property after reset() is called, otherwise calling reset() (or clear scrollback and reset) will always make alternate scrolling get disabled regardless of the respective profile property. Also this matches XTerm behavior. BUG: 402461 Test Plan: 1 - Open a new tab and make sure the alternate scrolling profile property is enabled 2 - Run less or any other application that uses the alternate screen, scrolling with the mouse should work 3 - Quit the previous application and execute `reset` 4 - Repeat 2, notice that now scrolling doesn't work After applying the patch, alternate scrolling mode is not changed after calling reset. Reviewers: #konsole, hindenburg Reviewed By: #konsole, hindenburg Subscribers: konsole-devel, hindenburg Tags: #konsole Differential Revision: https://phabricator.kde.org/D17781 (cherry picked from commit c9276130ac06f052f9251d8d67eaf45ff2f87708)
-rw-r--r--src/Vt102Emulation.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Vt102Emulation.cpp b/src/Vt102Emulation.cpp
index 73de3a8..892fe3f 100644
--- a/src/Vt102Emulation.cpp
+++ b/src/Vt102Emulation.cpp
@@ -1368,6 +1368,10 @@ void Vt102Emulation::resetModes()
// MODE_Allow132Columns is not reset here
// to match Xterm's behavior (see Xterm's VTReset() function)
+ // MODE_Mouse1007 (Alternate Scrolling) is not reset here, to maintain
+ // the profile alternate scrolling property after reset() is called, which
+ // makes more sense; also this matches XTerm behavior.
+
resetMode(MODE_132Columns); saveMode(MODE_132Columns);
resetMode(MODE_Mouse1000); saveMode(MODE_Mouse1000);
resetMode(MODE_Mouse1001); saveMode(MODE_Mouse1001);
@@ -1375,7 +1379,6 @@ void Vt102Emulation::resetModes()
resetMode(MODE_Mouse1003); saveMode(MODE_Mouse1003);
resetMode(MODE_Mouse1005); saveMode(MODE_Mouse1005);
resetMode(MODE_Mouse1006); saveMode(MODE_Mouse1006);
- resetMode(MODE_Mouse1007); saveMode(MODE_Mouse1007);
resetMode(MODE_Mouse1015); saveMode(MODE_Mouse1015);
resetMode(MODE_BracketedPaste); saveMode(MODE_BracketedPaste);