Using case-insensitive version of String.IndexOf instead of String.StartsWith to filter categories list.

This commit is contained in:
NenoLoje 2016-02-20 20:13:37 +00:00
parent 641cb46602
commit 72a0d7db16
1 changed files with 1 additions and 1 deletions

View File

@ -252,7 +252,7 @@ namespace OpenLiveWriter.PostEditor.PostPropertyEditing.CategoryControl
{
Predicate<TreeNode> prefixPredicate = delegate (TreeNode node)
{
return node.Text.ToLower(CultureInfo.CurrentCulture).StartsWith(criteria);
return node.Text.ToLower(CultureInfo.CurrentCulture).IndexOf(criteria, StringComparison.CurrentCultureIgnoreCase) >= 0;
};
if (criteria.Length > 0 && criteria.StartsWith(lastQuery))