Bug 513311

Summary: When searching, show few lines below or above the match
Product: [Applications] kate Reporter: Ján Halaša <jan>
Component: searchAssignee: KWrite Developers <kwrite-bugs-null>
Status: REPORTED ---    
Severity: wishlist    
Priority: NOR    
Version First Reported In: 25.08.1   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Ján Halaša 2025-12-13 18:49:44 UTC
SUMMARY

When searching in a text file, when a match is found that needs scrolling down, the match is highlighted, but it's line is the last one displayed. Often, it's necessary to see few lines below it to see the context (eg. when searching logs).
It would be good to show few more lines below the found text (or above it when searching backwards).

STEPS TO REPRODUCE

1. Open a longer text file
2. Search for a word that appears somewhere below the displayed part (it needs scrolling down)

OBSERVED RESULT

The editor scrolls down, so that the text found is on the list line displayed. Similarly, when searching backwards, the match is the first line displayed.

EXPECTED RESULT

It would be good to show few more line below the text found (or above it when searching backwards), so the user can see the context of the match.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Kubuntu 25.10
KDE Plasma Version: 6.4.5
KDE Frameworks Version: 6.17.0
Qt Version: 6.9.2