[Terminal Display] Don't hide the search box when scrolling with the keyboard
ClosedPublic

Authored by thsurrel on Nov 6 2018, 5:30 PM.

Details

Summary

When hitting Shift-Scrollup while having the search box opened, the search
box is closed.

Regression introduced by f93263d6b4dca25416b17c96ac9a996ee2059ef6

Test Plan

Open the search box, then scroll with the keyboard (e.g. with Shift-Scrollup)
The searchbox should not close.

Diff Detail

Repository
R319 Konsole
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
thsurrel created this revision.Nov 6 2018, 5:30 PM
Restricted Application added a project: Konsole. · View Herald TranscriptNov 6 2018, 5:30 PM
Restricted Application added a subscriber: konsole-devel. · View Herald Transcript
thsurrel requested review of this revision.Nov 6 2018, 5:30 PM

Shift + Pg Up/Down works for me and why it will set up esc key?

thsurrel added a comment.EditedNov 6 2018, 8:41 PM

According to http://doc.qt.io/qt-5/qt.html#Key-enum, Qt::Key_Escape is 0x01000000 and Qt::Key_PageUp (for example) is 0x01000016. So the condition event->key() & Qt::Key_Escape will be true when hitting Shift-pageup to scroll and ends up closing the searchbox.

And the bug is only in master, maybe this is why you did not see it ?

ngraham added a subscriber: ngraham.Nov 7 2018, 4:24 AM

Thanks, this works great for me.

anthonyfieroni accepted this revision.Nov 7 2018, 6:23 AM
This revision is now accepted and ready to land.Nov 7 2018, 6:23 AM
This revision was automatically updated to reflect the committed changes.

As a FYI, try to keep the lines < 70 columns if you can. It is annoying that phabricator doesn't give any indications of columns. If you use > 70, it makes the commit message and body multi-line.

Oh, I did not know that. I will definitely pay attention in the future, sorry.