Bug 402461 - Alternate screen buffer scrolling gets disabled after reset
Summary: Alternate screen buffer scrolling gets disabled after reset
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: kpart (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-22 15:14 UTC by Nikos Chantziaras
Modified: 2018-12-26 17:34 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 18.12.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikos Chantziaras 2018-12-22 15:14:50 UTC
SUMMARY
I use the "Enable Alternate Screen buffer scrolling" option in Konsole to be able to scroll using the mouse wheel when using "less". However, when the terminal is reset (using the "reset" command or by using the "Clear scrollback and reset" option of Konsole), the mouse wheel stops working. I have to go to the options, uncheck "alternate screen buffer scrolling" checkbox, click "apply", then check it again and "apply", at which point it starts working again.


STEPS TO REPRODUCE
1. Make sure "Enable Alternate Screen buffer scrolling" is enabled (right-click, "Edit current profile", "Mouse" tab.)
2. Type "man ls". You can scroll up/down with the mouse wheel.
3. Exit the manpage viewer and type "reset".
4. Type "man ls" again. You can no longer scroll using the mouse wheel.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Gentoo Linux AMD64
KDE Plasma Version: 5.14.4
KDE Frameworks Version: 5.53.0
Qt Version: 5.11.3
Comment 1 Ahmad Samir 2018-12-24 19:29:11 UTC
Should be fixed by https://phabricator.kde.org/D17781
Comment 2 Ahmad Samir 2018-12-24 19:34:16 UTC
I forgot to say, thank you for finding a way to reproduce this issue, (I've been hit by it several times, and it was driving me up the wall).
Comment 3 Nikos Chantziaras 2018-12-24 19:45:30 UTC
The patch applies cleanly to Konsole 18.12.0 and fixes the issue.

Thanks!
Comment 4 Kurt Hindenburg 2018-12-25 01:42:02 UTC
Git commit c9276130ac06f052f9251d8d67eaf45ff2f87708 by Kurt Hindenburg, on behalf of Ahmad Samir.
Committed on 25/12/2018 at 01:41.
Pushed by hindenburg into branch 'master'.

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.

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

M  +4    -1    src/Vt102Emulation.cpp

https://commits.kde.org/konsole/c9276130ac06f052f9251d8d67eaf45ff2f87708
Comment 5 Kurt Hindenburg 2018-12-25 01:42:51 UTC
Git commit b545a812e3bf74157387fd60b61f6e2146723834 by Kurt Hindenburg, on behalf of Ahmad Samir.
Committed on 25/12/2018 at 01:42.
Pushed by hindenburg into branch 'Applications/18.12'.

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.

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)

M  +4    -1    src/Vt102Emulation.cpp

https://commits.kde.org/konsole/b545a812e3bf74157387fd60b61f6e2146723834