When using replace (Ctrl+r), with a selected text, after pressing Next and the first match is found, pressing Next again will have no effect. It seems that Kdevelop changes the selected text to the first match and restrict its search to that selected string (therefore, pressing Next wouldn't find anything). For example, for a code like the following: #include <boost/format.hpp> #include "lineartriangle.h" #include "launchError.h" #include "macros.h" If we select only the first 3 lines and select and tick "Selection only" and search for "include" using "Next" in the command Replace, the "include" in the first line will be highlighted. However, pressing next again will continue to highlight that word. Pressing Replace and Next will replace the word, but Next will still have no effect. Reproducible: Always Steps to Reproduce: 1.Call Replace (Ctrl+r) 2.Select a portion of the text and tick Selection only 3.Press Next 2 times. Actual Results: Kdevelop selects the first match and can't find any other match. Expected Results: Kdevelop should find the next match.
Dear Bug Submitter, This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond. Thank you for helping us make KDE software even better for everyone!
Dear Bug Submitter, This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand. Thank you for helping us make KDE software even better for everyone!
Still seen in current master.
This looks like a KTextEditor bug to me. I can reproduce the issue in Kate.
Git commit ebe04f38d868503fdb9a2061665159768a5479b2 by Christoph Cullmann, on behalf of Jan Paul Batrina. Committed on 08/04/2021 at 19:55. Pushed by cullmann into branch 'master'. Fix incremental selection-only search Since search matches are selected after they are found, the "Search in selection only" option only works the first time. This patch saves the initial selection where the search is initiated and use that for succeeding selection-only searches. The selection is "forgotten" only after the selection is manually changed or the "selection only" option is toggled. M +18 -2 autotests/src/searchbar_test.cpp M +30 -14 src/search/katesearchbar.cpp https://invent.kde.org/frameworks/ktexteditor/commit/ebe04f38d868503fdb9a2061665159768a5479b2
*** Bug 413182 has been marked as a duplicate of this bug. ***