fix index out of range exception

occurs when query contains more than one whitespace eg. 'sql  manag'
This commit is contained in:
Jeremy Wu 2020-01-07 05:59:47 +11:00
parent 5040f09f0c
commit e4b017b304

View file

@ -61,7 +61,7 @@ namespace Wox.Infrastructure
var queryWithoutCase = opt.IgnoreCase ? query.ToLower() : query;
var querySubstrings = queryWithoutCase.Split(' ');
var querySubstrings = queryWithoutCase.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
int currentQuerySubstringIndex = 0;
var currentQuerySubstring = querySubstrings[currentQuerySubstringIndex];
var currentQuerySubstringCharacterIndex = 0;