Bug 448320

Summary: Newline search/replace only replaces first instance in "RegExp" mode
Product: [Frameworks and Libraries] frameworks-ktexteditor Reporter: Christopher Jacobs <MrChristopherJacobs>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: waqar.17a
Priority: NOR    
Version First Reported In: 5.90.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

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 ***