mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
WI-8102 replace all in selection should not deselect block
This commit is contained in:
@@ -475,10 +475,10 @@ public class FindUtil {
|
||||
return true;
|
||||
}
|
||||
|
||||
private static boolean doReplace(Project project, final Editor editor, FindModel model, final Document document, int caretOffset,
|
||||
private static boolean doReplace(Project project, final Editor editor, final FindModel aModel, final Document document, int caretOffset,
|
||||
boolean toPrompt, ReplaceDelegate delegate) {
|
||||
FindManager findManager = FindManager.getInstance(project);
|
||||
model = (FindModel)model.clone();
|
||||
final FindModel model = (FindModel)aModel.clone();
|
||||
int occurrences = 0;
|
||||
|
||||
List<Pair<TextRange,String>> rangesToChange = new ArrayList<Pair<TextRange, String>>();
|
||||
@@ -588,7 +588,9 @@ public class FindUtil {
|
||||
public void run() {
|
||||
document.setText(newText);
|
||||
editor.getCaretModel().moveToOffset(finalCaretOffset);
|
||||
editor.getSelectionModel().removeSelection();
|
||||
if (model.isGlobal()) {
|
||||
editor.getSelectionModel().removeSelection();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user