diff options
author | mkrueger <mkrueger@novell.com> | 2011-02-21 15:17:31 +0300 |
---|---|---|
committer | mkrueger <mkrueger@novell.com> | 2011-02-21 15:17:31 +0300 |
commit | 0e61d6aad097f73a924f5db25b9a5ccfe635559b (patch) | |
tree | 339c9ab4b48491c74e7d415196d899b0fe536a6d /main/src/core/MonoDevelop.Core/MonoDevelop.Core.Text | |
parent | 3acf7b644918e6610cbb7a291280869e0cfd93d8 (diff) |
Optimized backtracking matcher.
Diffstat (limited to 'main/src/core/MonoDevelop.Core/MonoDevelop.Core.Text')
-rw-r--r-- | main/src/core/MonoDevelop.Core/MonoDevelop.Core.Text/BacktrackingStringMatcher.cs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Text/BacktrackingStringMatcher.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Text/BacktrackingStringMatcher.cs index 3cf1cc679f..ad0dea190b 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Text/BacktrackingStringMatcher.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Text/BacktrackingStringMatcher.cs @@ -104,11 +104,10 @@ namespace MonoDevelop.Core.Text // no match, try to continue match at the next word start j++; for (; j < text.Length; j++) { - bool prevIsPunctuation = j > 0 && !char.IsLetterOrDigit (text [j - 1]); // word start is either a upper case letter (FooBar) or a char that follows a non letter // like foo:bar if (char.IsUpper (text[j]) && filterChar == text[j] || - (prevIsPunctuation && filterChar == char.ToUpper (text[j]))) + (filterChar == char.ToUpper (text[j]) && j > 0 && !char.IsLetterOrDigit (text[j - 1]))) return j; } return -1; |