mirror of
https://github.com/processing/processing4.git
synced 2026-02-03 21:59:20 +01:00
Merge pull request #4271 from Akarshit/bugfix-findReplace
Checked if the string to replace contains the string searched
This commit is contained in:
@@ -452,8 +452,10 @@ public class FindReplace extends JFrame {
|
||||
// you couldn't seriously be replacing 50K times o_O
|
||||
while (--c > 0) {
|
||||
if (find(false, false)) {
|
||||
if(editor.getSketch().getCurrentCodeIndex() == startTab
|
||||
&& editor.getSelectionStart() == startIndex){
|
||||
if (editor.getSketch().getCurrentCodeIndex() == startTab
|
||||
&& (editor.getSelectionStart() >= startIndex && (editor
|
||||
.getSelectionStart() <= startIndex
|
||||
+ replaceField.getText().length()))) {
|
||||
// we've reached where we started, so stop the replace
|
||||
Toolkit.beep();
|
||||
editor.statusNotice("Reached beginning of search!");
|
||||
|
||||
Reference in New Issue
Block a user