diff options
author | Tom Schindl | 2016-03-22 19:02:44 +0000 |
---|---|---|
committer | Tom Schindl | 2016-03-22 19:02:44 +0000 |
commit | 587039fe4ba875990bf6ea3ac46c6eee560a4598 (patch) | |
tree | c30c70fff7c553eb8985130d969136492585a8fd /bundles/code/org.eclipse.fx.text/src/org/eclipse/fx | |
parent | b76b19eccc2b8b95e7aee6f5eb22b2d93f96ee9d (diff) | |
download | org.eclipse.efxclipse-587039fe4ba875990bf6ea3ac46c6eee560a4598.tar.gz org.eclipse.efxclipse-587039fe4ba875990bf6ea3ac46c6eee560a4598.tar.xz org.eclipse.efxclipse-587039fe4ba875990bf6ea3ac46c6eee560a4598.zip |
Bug 490215 - CombinedWorldRule needs to check if the char before the check is none word-char
Diffstat (limited to 'bundles/code/org.eclipse.fx.text/src/org/eclipse/fx')
-rw-r--r-- | bundles/code/org.eclipse.fx.text/src/org/eclipse/fx/text/rules/CombinedWordRule.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bundles/code/org.eclipse.fx.text/src/org/eclipse/fx/text/rules/CombinedWordRule.java b/bundles/code/org.eclipse.fx.text/src/org/eclipse/fx/text/rules/CombinedWordRule.java index fd287bff0..38672c5b3 100644 --- a/bundles/code/org.eclipse.fx.text/src/org/eclipse/fx/text/rules/CombinedWordRule.java +++ b/bundles/code/org.eclipse.fx.text/src/org/eclipse/fx/text/rules/CombinedWordRule.java @@ -334,6 +334,15 @@ public class CombinedWordRule implements IRule { * @see IRule#evaluate(ICharacterScanner) */ public IToken evaluate(ICharacterScanner scanner) { + // first check if the previous char is a none matching char + if( scanner.getColumn() > 0 ) { + scanner.unread(); + int previousChar = scanner.read(); + if( fDetector.isWordPart((char)previousChar) ) { + return Token.UNDEFINED; + } + } + int c= scanner.read(); if (fDetector.isWordStart((char) c)) { if (fColumn == UNDEFINED || (fColumn == scanner.getColumn() - 1)) { |