Merge branch 'develop' into releases/Release_2_11_2_Branch
[jalview.git] / src / jalview / analysis / Finder.java
index c545c7f..bf86a86 100644 (file)
@@ -20,6 +20,8 @@
  */
 package jalview.analysis;
 
+import java.util.Locale;
+
 import jalview.api.AlignViewportI;
 import jalview.api.FinderI;
 import jalview.datamodel.AlignmentI;
@@ -148,7 +150,7 @@ public class Finder implements FinderI
     idMatches = new ArrayList<>();
 
     String searchString = matchCase ? theSearchString
-            : theSearchString.toUpperCase();
+            : theSearchString.toUpperCase(Locale.ROOT);
     Regex searchPattern = new Regex(searchString);
     searchPattern.setIgnoreCase(!matchCase);
 
@@ -417,7 +419,7 @@ public class Finder implements FinderI
      * update residueIndex to next position after the start of the match
      * (findIndex returns a value base 1, columnIndex is held base 0)
      */
-    residueIndex += offset + 1;
+    residueIndex = searchPattern.matchedFrom()+1;
 
     /*
      * return false if the match is entirely in a hidden region