As observed in Kate 16.04.1 on Manjaro 64-bit and in 3.14.13 on Ubuntu 32-bit. The behavior is slightly different with respect to the incorrect number of finds (see below), but it's always wrong and changes in both. Reproducible: Always Steps to Reproduce: 1. Make and open a file consisting of 64 newline characters (65 lines), e.g.: $ printf '\n%.0s' {1..64} > kate-bug-test.txt $ kate kate-bug-test.txt 2. Press Ctrl-R Find: \n Replace: ====\n Mode: Escape Sequences click Replace All 3. Close search, press Ctrl-Z to undo. 4. Repeat steps 2-3 several times. Actual Results: YMMV. For me: On the newer version: - cursor position doesn't seem to matter - 1st time it finds 32 (all the odd-numbered). - 2nd time it finds 1 (line 64). - 3rd and following it finds 0. On the older version: - 1st time finds 32 (odd lines 1-63) - 2nd time finds 32 (line 1, even lines 4-64) - 3rd time finds 31 (line 1, odd lines 5-63) - 4th time finds 31 (line 1, even lines 6-64) - 5th time finds 30 (line 1, odd lines 7-63) - 6th time finds 30 (line 1, even lines 8-64) etc. Expected Results: Should find and replace '\n' with '====\n' 64 times.
NB: regarding "cursor position doesn't seem to matter" that seems to apply to either version. I initially thought it did matter due to the changing behavior, but forgot to delete that line when I found it didn't.
Just a thought: the fact that the behavior changes from one run to another seems to indicate an underlying bug that should be fixed BEFORE the actual behavior is fixed (finding 64, not 32). If you fix the behavior first, you might lose the ability to reproduce the underlying bug.
I can confirm this bug. NOTE: it is the "escape sequence" mode that is effected not regular-expression
This is fixed for KDE Frameworks 5.50, see bug #381080. *** This bug has been marked as a duplicate of bug 381080 ***