mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-47125 - NPE: UnSelectWordHandler.doAction
This commit is contained in:
+11
-4
@@ -83,12 +83,19 @@ public class UnSelectWordHandler extends EditorActionHandler {
|
||||
}
|
||||
}
|
||||
|
||||
while (element instanceof PsiWhiteSpace) {
|
||||
if (element.getNextSibling() == null) {
|
||||
if (element instanceof PsiWhiteSpace) {
|
||||
PsiElement nextSibling = element.getNextSibling();
|
||||
if (nextSibling == null) {
|
||||
element = element.getParent();
|
||||
if (element == null || element instanceof PsiFile) {
|
||||
return;
|
||||
}
|
||||
nextSibling = element.getNextSibling();
|
||||
if (nextSibling == null) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
element = element.getNextSibling();
|
||||
element = nextSibling;
|
||||
cursorOffset = element.getTextRange().getStartOffset();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user