mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
RegExp: only skip regular chars not escapes in word selection filter
This commit is contained in:
@@ -19,7 +19,6 @@ import com.intellij.lang.ASTNode;
|
||||
import com.intellij.openapi.util.Condition;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import org.intellij.lang.regexp.psi.RegExpChar;
|
||||
import org.intellij.lang.regexp.psi.RegExpNamedCharacter;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@@ -30,7 +29,7 @@ public class RegExpWordSelectionFilter implements Condition<PsiElement> {
|
||||
public boolean value(@NotNull PsiElement element) {
|
||||
final ASTNode node = element.getNode();
|
||||
if ((node != null && node.getElementType() == RegExpTT.CHARACTER) ||
|
||||
(element instanceof RegExpChar && !(element instanceof RegExpNamedCharacter))) {
|
||||
(element instanceof RegExpChar && ((RegExpChar)element).getType() == RegExpChar.Type.CHAR)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user