Bug 302284 - highlight the position of all found search results in the scrollbar, just like google chrome does
Summary: highlight the position of all found search results in the scrollbar, just lik...
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: history (other bugs)
Version First Reported In: 2.8.3
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: kamisama
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2012-06-21 07:51 UTC by Delian Angelov
Modified: 2025-08-25 00:43 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Delian Angelov 2012-06-21 07:51:04 UTC
Google Chrome does this in its search results, as well as seveAn example for the feature is described here:
http://www.techdreams.org/browsers/brilliant-google-chrome-ui-highlights-search-text-occurrences-on-scroll-bar/379-20080928

In summary - you search for something, and then you not only are transported to the first match, but the scrollbar actually shows the aproximate positions in the scroll buffer where all the matches are found. 

This allows feedback for:
1)whether there are any matches
2)aproximately how many they are
3)how they are distributed in the buffer



Reproducible: Always

Steps to Reproduce:
1. Open konsole
2. Make the scrollbar visible, if it is not already
3. Run for example 'for((i=0;i<10;i++));do ls -la /; done', so that there are several times more lines in the scrollbuffer, than currently visible in the konsole window.
3. Press Ctrl-Shift-F, and search for sbin for example.
Actual Results:  
The first 'sbin' match is highlighted in the konsole window. The scrollbar thumb should be repositioned, so according to the current window position in the scrollbuffer. The scrollbar background, however is NOT changed.

Expected Results:  
The scrollbar background should be striped, to highlight where are all the matches for the given search term (sbin).
Comment 1 Jekyll Wu 2012-06-30 08:01:14 UTC
I agree that is a good idea.
Comment 2 kamisama 2025-01-31 22:36:27 UTC
Hi, I agree that this would be a nice to have feature for Konsole. I've already started exploring the codebase and experimenting with possible implementations. I think I might be able to get this working.

Would it be okay if I work on this? Let me know if there's anything specific I should keep in mind while implementing it.

Thanks.
Comment 3 kamisama 2025-02-01 21:42:14 UTC
Edit: I have create a MR: https://invent.kde.org/utilities/konsole/-/merge_requests/1061(In reply to kamisama from comment #2)
> Hi, I agree that this would be a nice to have feature for Konsole. I've
> already started exploring the codebase and experimenting with possible
> implementations. I think I might be able to get this working.
> 
> Would it be okay if I work on this? Let me know if there's anything specific
> I should keep in mind while implementing it.
> 
> Thanks.

Edit: I have create a MR: https://invent.kde.org/utilities/konsole/-/merge_requests/1061
Comment 4 Kurt Hindenburg 2025-02-20 01:14:43 UTC
Git commit e389807d55060ef086722ea49d8b36d6264c8ebb by Kurt Hindenburg, on behalf of Ujjwal Shekhawat.
Committed on 20/02/2025 at 01:14.
Pushed by hindenburg into branch 'master'.

Implement scrollbar highlighting for search results

This PR introduces a feature to highlight the position of search results on the scrollbar, similar to how search results are highlighted in browsers like Google Chrome, editors like VSCode. The aim is to provide users with a visual indicator on the scrollbar, helping them quickly navigate through the results. 

M  +29   -0    src/SearchHistoryTask.cpp
M  +3    -0    src/SearchHistoryTask.h
M  +2    -0    src/profile/Profile.cpp
M  +4    -0    src/profile/Profile.h
M  +5    -0    src/session/SessionController.cpp
M  +2    -0    src/terminalDisplay/TerminalDisplay.cpp
M  +66   -2    src/terminalDisplay/TerminalScrollBar.cpp
M  +13   -0    src/terminalDisplay/TerminalScrollBar.h
M  +18   -0    src/widgets/EditProfileDialog.cpp
M  +3    -0    src/widgets/EditProfileDialog.h
M  +139  -100  src/widgets/EditProfileScrollingPage.ui

https://invent.kde.org/utilities/konsole/-/commit/e389807d55060ef086722ea49d8b36d6264c8ebb