Bug 484231

Summary: Search & Replace plugin: Results are inserted in active tab
Product: [Applications] kate Reporter: Dominik Haumann <dhaumann>
Component: searchAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: kare.sars
Priority: NOR    
Version First Reported In: 23.08.5   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Dominik Haumann 2024-03-22 10:33:29 UTC
In the search & replace plugin,
1. click on "Add new search tab" tool button
2. Perform a long search
3. Change focus to 1st result tab

Notice that the search results that are supposed to go into the 2nd search tab are now inserted into the 1st search tab.
In case the 1st search tab already has results, the new results are added and mixed with the existing ones.

Correct would be that the search results are bound to the tab where the search request was started.
Comment 1 Kåre Särs 2024-04-19 05:43:21 UTC
Working on it now. It is a bit risky change, need to be careful....
Comment 2 Bug Janitor Service 2024-04-19 15:03:45 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/1465
Comment 3 Christoph Cullmann 2024-04-21 14:48:24 UTC
Git commit 41991a47e3433b002474d8b239e41550d06943b6 by Christoph Cullmann, on behalf of Kåre Särs.
Committed on 21/04/2024 at 14:48.
Pushed by cullmann into branch 'master'.

S&R: Improve tab handling

- Fix Search results populating wrong search tab
- There is also a bug with highlighting matches when switching tabs

M  +1    -0    .gitignore
M  +136  -127  addons/search/SearchPlugin.cpp
M  +4    -3    addons/search/SearchPlugin.h

https://invent.kde.org/utilities/kate/-/commit/41991a47e3433b002474d8b239e41550d06943b6