SUMMARY *** NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols. See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports *** STEPS TO REPRODUCE 1. Create a file with multiple occurrence of a word to replace 2. Switch in block mode 3. Select the word to replace 4. Type Ctrl+R to replace the word 5. Type the new word which must replace the selected one 3. Click on "Replace All" button OBSERVED RESULT No replacements made (the popup "0 replacements made" appear) EXPECTED RESULT All occurrences was replaced. SOFTWARE/OS VERSIONS Windows: N/A macOS: N/A Linux/KDE Plasma: 5.15.0-40-generic (available in About System) KDE Plasma Version: 5.24.4 KDE Frameworks Version: 5.92.0 Qt Version: 5.15.3 ADDITIONAL INFORMATION Also reproduced on the master.
This is unlikely to change. If someone wants to a replace only in a particular part of the document, they can select that part and do replace. Best we can do is to show a warning that replace will not work or disable the UI.
I can reproduce this bug. It happens when all these conditions are met : - block selection mode is checked - option "search in the selection only" is not checked - some text is selected In this case it should find/replace all occurrences in the whole document but it finds "0 occurrences". Following actions are affected : - find all - replace all It works correctly if selection mode is normal (no block mode) It works correctly if option "search in the selection only" is checked It works correctly selection is empty Note : "search in the selection only" is automatically checked when a text is selected, it must be explicitly unchecked to reproduce this bug. I'm trying to add an autotest to reproduce this bug.
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/631
Git commit 5c6f373e307d981935ddd14a27addec8aca29bc9 by Christoph Cullmann, on behalf of Rémi Peuchot. Committed on 08/11/2023 at 19:48. Pushed by cullmann into branch 'master'. KateSearchBar: ignore block mode if selectionOnly option is disabled FIXED-IN:5.113 M +2 -1 src/search/katesearchbar.cpp https://invent.kde.org/frameworks/ktexteditor/-/commit/5c6f373e307d981935ddd14a27addec8aca29bc9