Bug 436674

Summary: Clearing the search field in "Search and Replace" should clear the search highlight
Product: [Applications] kate Reporter: Dmitri Koulikoff <kde>
Component: searchAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: kare.sars
Priority: NOR    
Version First Reported In: 21.04.0   
Target Milestone: ---   
Platform: Slackware   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Dmitri Koulikoff 2021-05-06 07:37:22 UTC
SUMMARY

  Previously to disable the highlighting the matching substring found in "Search and Replace" it was enough just to clear the "Find" field. Now it is broken and I can not remove the colouring.

The substrings 


STEPS TO REPRODUCE
1. Open Search and Replace
2. Type any existing substring and click Search
3. Make sure you see the yellow background of the substrings
4. Open Search and Replace and clear the content of the "Find" field.

OBSERVED RESULT

  The highlighting remains

EXPECTED RESULT

  The highlighting must disappear as earlier.


SOFTWARE/OS VERSIONS
Operating System: Slackware-current
KDE Plasma Version: 5.21.4
KDE Frameworks Version: 5.81.0
Qt Version: 5.15.2
Kernel Version: 5.10.34
OS Type: 64-bit
Graphics Platform: X11
Processors: 12 × Intel® Core™ i7-9750H CPU @ 2.60GHz
Memory: 31.1 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 630

ADDITIONAL INFORMATION
Comment 1 Kåre Särs 2021-05-06 08:39:49 UTC
Hi,

Thanks for the report. In deed if we clear the search field, the highlighting remains... As a workaround you can for now just press ESC and the highlighting should go away.

I'm changing this to be a wish to clear the highlight on clearing the search field.
Comment 2 Bug Janitor Service 2022-01-10 15:59:28 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/553
Comment 3 Christoph Cullmann 2022-01-15 16:09:53 UTC
Git commit 76a71f486bc00a2476be5e3643a0c42456bcfc4a by Christoph Cullmann, on behalf of Waqar Ahmed.
Committed on 15/01/2022 at 16:05.
Pushed by cullmann into branch 'master'.

Clear highlights if text field becomes empty

M  +2    -0    addons/search/plugin_search.cpp

https://invent.kde.org/utilities/kate/commit/76a71f486bc00a2476be5e3643a0c42456bcfc4a