Fix non-file scope case for CR-IU-898 Significant performance improvement for processing word at caret (i.e. var highlights) for worst cases

(cherry picked from commit fcc3450)
This commit is contained in:
Alexey Gopachenko
2014-11-19 10:27:07 +01:00
parent d7a6dbb000
commit f623cf21b8
@@ -145,7 +145,7 @@ public class LowLevelSearchUtil {
TreeElement leafNode;
int offsetR = offset;
if (last !=null) {
offsetR -= last.getStartOffset() + last.getTextLength();
offsetR -= (last.getStartOffset() - scopeNode.getStartOffset()) + last.getTextLength();
out:
while (offsetR >= 0) {
TreeElement next = last.getTreeNext();