Bug 413182 - [KTextEditor]: "Replace" (instead of "Replace All") breaks "in selection only"
Summary: [KTextEditor]: "Replace" (instead of "Replace All") breaks "in selection only"
Status: RESOLVED DUPLICATE of bug 327408
Alias: None
Product: frameworks-ktexteditor
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.60.0
Platform: Compiled Sources All
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-19 11:22 UTC by RJVB
Modified: 2021-04-15 07:39 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description RJVB 2019-10-19 11:22:49 UTC
SUMMARY
Using the individual "Replace" button on a search & replace limited to the current selection breaks scope of application.

STEPS TO REPRODUCE
1. Select a region of tet
2. Bring up the search & replace interface, enter a pattern and replacement
3. Select "Search in the selection only"
4. (optional?) Hit "Find All"
5. Hit Replace

OBSERVED RESULT
The 1st pattern is replaced, which changes (limits) the current selection to the replacement text. Further replacements are impossible.

EXPECTED RESULT
Hitting "Replace" repeatedly until the end of the selected region is attained should give the same result as hitting "Replace All"

SOFTWARE/OS VERSIONS
KDE Frameworks Version: 5.60.0
Qt Version: 5.9.8

ADDITIONAL INFORMATION
I observed this in KDevelop but presume the S&R functionality comes from KTextEditor.

I realise this may be tricky to implement...
Comment 1 Jan Paul Batrina 2021-04-15 07:39:54 UTC
Hello, this has been fixed with https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/128, albeit there's still a tricky problem with undo (see PR for details)

*** This bug has been marked as a duplicate of bug 327408 ***