Skip to content

Commit

Permalink
Fixed replacing in decompilers
Browse files Browse the repository at this point in the history
  • Loading branch information
SuspiciousActivity authored Mar 9, 2021
1 parent 5bec627 commit ea282d2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/me/ByteEdit/boxes/SearchBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,17 @@ public void replaceFind() {
}

public void replace() {
if (!Main.decompiler.isEditable())
return;
String txt = Main.txtByteEditView.getText();
int startPos = Main.txtByteEditView.getSelectionStart();
Main.txtByteEditView.replaceSelection(txtReplace.getText());
Main.txtByteEditView.select(startPos, startPos + txtReplace.getText().length());
}

public void replaceAll() {
if (!Main.decompiler.isEditable())
return;
String toFind = txtFind.getText();
String toReplace = txtReplace.getText();
String txt = Main.txtByteEditView.getText();
Expand Down

0 comments on commit ea282d2

Please sign in to comment.