mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
spellchecker: reject selection after rename
This commit is contained in:
@@ -107,6 +107,7 @@ public class RenameTo extends ShowSuggestions implements SpellCheckerQuickFix {
|
||||
|
||||
DataContext dataContext = SimpleDataContext.getSimpleContext(map, DataManager.getInstance().getDataContext(editor.getComponent()));
|
||||
AnAction action = new RenameElementAction();
|
||||
final boolean hadSelection = editor.getSelectionModel().hasSelection();
|
||||
final TextRange range = psiElement.getTextRange();
|
||||
if (range != null) {
|
||||
editor.getSelectionModel().setSelection(range.getStartOffset(), range.getEndOffset());
|
||||
@@ -116,6 +117,9 @@ public class RenameTo extends ShowSuggestions implements SpellCheckerQuickFix {
|
||||
if (provider != null) {
|
||||
provider.setActive(false);
|
||||
}
|
||||
if (!hadSelection) {
|
||||
editor.getSelectionModel().removeSelection();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user