| Summary: | Bug in search in files panel | ||
|---|---|---|---|
| Product: | [Applications] kate | Reporter: | Pozsgay Máté <matthew.linux> |
| Component: | search | Assignee: | KWrite Developers <kwrite-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | CC: | christoph, kare.sars |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Other | ||
| Latest Commit: | https://invent.kde.org/utilities/kate/commit/3ff6e15eca384f9300bfb31c3edc299fd10e7c91 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
|
Description
Pozsgay Máté
2021-03-11 15:49:44 UTC
I actually noticed this too just some days ago.... Hmm, I can't reproduce this with the master version of Kate.. The secret is to create two new documents (not saved) add text to them and then search in them.... Hmm, isn't the problem that we match url => document? For untitled stuff that will fail, I guess we need to use there the document pointer. Similar to the fixes for quick open here: https://invent.kde.org/utilities/kate/-/merge_requests/400 A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/554 Git commit 3ff6e15eca384f9300bfb31c3edc299fd10e7c91 by Waqar Ahmed. Committed on 10/01/2022 at 19:04. Pushed by cullmann into branch 'master'. Fix search for unsaved files Search for unsaved files doesn't work because we don't have QUrl's for them. Instead use KTextEditor::Document pointer for such files. Included is a small fix that I noticed while working on this. If you try to replace checked after searching, the file that you have opened doesn't get highlights as it should. Possible further improvements: - Ask main window for the "tab title" of the doc so that we can use that in the search tree view. Otherwise its kind of really ambigous Signed-off-by: Waqar Ahmed <waqar.17a@gmail.com> A +0 -0 addons/katebuild-plugin/highlighter.cpp [License: Trivial file] A +21 -0 addons/katebuild-plugin/highlighter.h [License: LGPL(v2.0)] M +58 -26 addons/search/MatchModel.cpp M +18 -7 addons/search/MatchModel.h M +11 -6 addons/search/Results.cpp M +4 -3 addons/search/Results.h M +1 -1 addons/search/SearchDiskFiles.h M +34 -16 addons/search/plugin_search.cpp M +1 -1 addons/search/plugin_search.h M +2 -2 addons/search/search_open_files.cpp M +1 -1 addons/search/search_open_files.h https://invent.kde.org/utilities/kate/commit/3ff6e15eca384f9300bfb31c3edc299fd10e7c91 |