Bug 448936

Summary: "Replace all" replaces only one instance when newline character in replacement string
Product: [Applications] kate Reporter: leonhardeuler1707
Component: searchAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: jpmbatrina01, w01dnick
Priority: NOR    
Version First Reported In: 21.12.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Kate newline replace all works

Description leonhardeuler1707 2022-01-22 04:36:43 UTC
SUMMARY
***
"Replace all" replaces only one instance when newline character in replacement string.
***


STEPS TO REPRODUCE
1. Create a text file with the content "Each, word, is, a, line"
2. Press Ctrl+R for search and replace
3. Set mode to "Escape sequences"
4. Find comma and replace with \n
5. Click "Replace All"

OBSERVED RESULT
Each
 word, is, a, line

EXPECTED RESULT
Each
 word
 is
 a
 line

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.23.5
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Comment 1 Jan Paul Batrina 2022-01-30 09:32:12 UTC
Created attachment 146067 [details]
Kate newline replace all works

Thank you for the bug report!

"Replace all" with newline works properly here, both with version 21.12.0 and the latest dev version (see attached GIF)
Comment 2 Mykola Krachkovsky 2022-01-31 14:59:27 UTC
I think this bug should be solved with Commit 863f606b, see bug https://bugs.kde.org/show_bug.cgi?id=447972.
Comment 3 leonhardeuler1707 2022-01-31 19:58:58 UTC
Thanks for the follow-up. I confirm that Kate 22.03.70 works as expected.