Bug 448320 - Newline search/replace only replaces first instance in "RegExp" mode
Summary: Newline search/replace only replaces first instance in "RegExp" mode
Status: RESOLVED DUPLICATE of bug 447972
Alias: None
Product: frameworks-ktexteditor
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 5.90.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-12 14:15 UTC by Christopher Jacobs
Modified: 2022-01-12 14:47 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 Christopher Jacobs 2022-01-12 14:15:14 UTC
SUMMARY
When using the escape sequence '\n' as the "Find" entry in either Kate or Kwrite, choosing to "Replace All" only replaces the first instance. "Find All" will correctly report the number of newlines in the file/selection.

The behavior is correct when operating in "Escape sequences" mode. It appears that only the "RegExp" mode is broken this way. Possibly related to: https://bugs.kde.org/show_bug.cgi?id=447972. The total number of lines in the file/selection doesn't matter this way around, though. The replacement always only affects the first occurrence.

OBSERVED RESULT
Only the first "found" instance is replaced.

EXPECTED RESULT
All "found" instances are replaced.

SOFTWARE/OS VERSIONS
ArchLinux
plasma-workspace 5.23.5-2
plasma-framework 5.90.0-1
qt5-base 5.15.2+kde+r286-1
Comment 1 Waqar Ahmed 2022-01-12 14:47:30 UTC

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