Bug 449461 - Search and replace does nothing
Summary: Search and replace does nothing
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: application (other bugs)
Version First Reported In: 21.12.1
Platform: openSUSE Linux
: NOR major
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-01 16:31 UTC by php4fan
Modified: 2022-02-01 20:40 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description php4fan 2022-02-01 16:31:43 UTC
STEPS TO REPRODUCE
1.  In a new file, type this:
aaa foo bar
lorem aaa ipsum
2.  Go to Search and Replace
3. Choose "in current file"
4.  Fill in to search for "aaa" and replace with "xxx"
5. Click on "Search". Found matches will show up below and will be already checked
6. Click "Replace Checked" or "Replace".

OBSERVED RESULT
When I click on "replace checked" nothing happens.
When I click on "Replace", nothing gets replaced, and Kate switches to another tab. Complete madness.

EXPECTED RESULT
With "Replace checked" it should replace the checked matches, which are all of them because I haven't unchecked any.
With Replace it's not clear (and that's a design flaw) whether it's supposed to replace one next occurrence or all occurrences (usually, normal editors with decent search&replace interfaces have two buttons, "replace" (one) and "replace all").


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Waqar Ahmed 2022-02-01 20:40:02 UTC
This has been fixed in master.

It fails because we were using URLs to do everything, but unsaved newly created files have no URLs so search didn't work there.