Fix search result highlight when scrolling
ClosedPublic

Authored by thsurrel on Nov 11 2018, 3:43 PM.

Details

Summary

The highlighted line of a search result is not updated correctly
when scrolling a screen with repeated lines.

Test Plan

cat a file containing the same line repeated many times.
Search for a string, then scroll: the highlight line should
be displayed correctly.

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 11 2018, 3:43 PM
Restricted Application added a project: Konsole. · View Herald TranscriptNov 11 2018, 3:43 PM
Restricted Application added a subscriber: konsole-devel. · View Herald Transcript
thsurrel requested review of this revision.Nov 11 2018, 3:43 PM
thsurrel edited the test plan for this revision. (Show Details)Nov 11 2018, 3:45 PM
hindenburg added inline comments.
src/TerminalDisplay.cpp
1435

if ((_screenWindow->currentResultLine() != -1) && (_screenWindow->scrollCount() > 0)) {

IMHO this is easier to read and understand

thsurrel updated this revision to Diff 45333.Nov 11 2018, 10:10 PM

Fix as per hindenburg comment

hindenburg accepted this revision.Nov 13 2018, 1:45 AM
This revision is now accepted and ready to land.Nov 13 2018, 1:45 AM
This revision was automatically updated to reflect the committed changes.