[konsole] [Bug 510762] New: Backwards search starts from the beginning of scrollback rather than end

bugreporter bugzilla_noreply at kde.org
Sat Oct 18 19:06:21 BST 2025


https://bugs.kde.org/show_bug.cgi?id=510762

            Bug ID: 510762
           Summary: Backwards search starts from the beginning of
                    scrollback rather than end
    Classification: Applications
           Product: konsole
      Version First master
       Reported In:
          Platform: KDE Linux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: history
          Assignee: konsole-devel at kde.org
          Reporter: somerandomusername234 at proton.me
  Target Milestone: ---

Created attachment 185885
  --> https://bugs.kde.org/attachment.cgi?id=185885&action=edit
Tentative patch that seems to fix backwards search

SUMMARY
Even when the "search backwards" option is enabled (default), searching for a
word first jumps to the beginning of scrollback history and then searches
backwards from there.

I think this is a bug since it defeats the purpose of backward search. I would
expect a backward search to begin from the current prompt (bottom of scrollback
history) rather than the top.

STEPS TO REPRODUCE
1. On KDE Linux, or probably other KDE distributions (confirmed on Debian
stable), run the following commands in a new Konsole session:

% echo foo
foo
% sudo dmesg | tail -n200
(this is just for filling scrollback history and make the first lines scroll
away)
% echo foo
foo

2. Click "Find" or press Ctrl+Shift+F

3. Search for "foo"

OBSERVED RESULT
The first match is near the beginning of scrollback history.

EXPECTED RESULT
The first match should be the last "foo" at the bottom, just before the current
prompt, since we are supposed to search backwards.

SOFTWARE/OS VERSIONS
Operating System: KDE Linux 2025-10-18
KDE Plasma Version: 6.5.80
KDE Frameworks Version: 6.20.0
Qt Version: 6.10.0

ADDITIONAL INFORMATION
I can make it work the way I expect by removing the scrollTo(_searchStartLine)
call in SessionController::searchTextChanged().

However this call is probably there for a reason, and I haven't studied the
Konsole code very well, so it might not be the best way to solve this bug.

So I'm just attaching a sample patch here not as a merge request, but to help
actual Konsole devs know where to start looking.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the konsole-devel mailing list