Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/core/MonoDevelop.Core/MonoDevelop.Core.Text/BacktrackingStringMatcher.cs')
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core.Text/BacktrackingStringMatcher.cs22
1 files changed, 14 insertions, 8 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 53c9f25962..d28da461a2 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Text/BacktrackingStringMatcher.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Text/BacktrackingStringMatcher.cs
@@ -138,17 +138,23 @@ namespace MonoDevelop.Core.Text
// letter case
ch = text [j];
bool textCharIsUpper = char.IsUpper (ch);
- if (!onlyWordStart && filterChar == (textCharIsUpper ? ch : char.ToUpper (ch)) && char.IsLetter (ch)) {
- // cases don't match. Filter is upper char & letter is low, now prefer the match that does the word skip.
- if (!(textCharIsUpper || (filterTextLowerCaseTable & flag) != 0) && j + 1 < text.Length) {
- int possibleBetterResult = GetMatchChar (text, i, j + 1, onlyWordStart);
- if (possibleBetterResult >= 0)
- return possibleBetterResult;
+ if (!onlyWordStart) {
+ if (filterChar == (textCharIsUpper ? ch : char.ToUpper (ch)) && char.IsLetter (ch)) {
+ // cases don't match. Filter is upper char & letter is low, now prefer the match that does the word skip.
+ if (!(textCharIsUpper || (filterTextLowerCaseTable & flag) != 0) && j + 1 < text.Length) {
+ int possibleBetterResult = GetMatchChar (text, i, j + 1, onlyWordStart);
+ if (possibleBetterResult >= 0)
+ return possibleBetterResult;
+ }
+ return j;
+ }
+ } else {
+ if (textCharIsUpper && filterChar == ch && char.IsLetter (ch)) {
+ return j;
}
- return j;
}
+
// no match, try to continue match at the next word start
-
bool lastWasLower = false;
bool lastWasUpper = false;
int wordStart = j + 1;