Fix autocomplete text issue on query change (#7392)

* Fix autocomplete text issue on query change

* Update from invariant to ordinal case for exact byte to byte matching

* Add tests for checking when autocomplete should be empty
This commit is contained in:
Divyansh Srivastava
2020-10-20 14:53:32 -07:00
committed by GitHub
parent 0314b570cd
commit 466ed10f3d
3 changed files with 72 additions and 3 deletions

View File

@@ -336,8 +336,9 @@ namespace PowerLauncher
{
var textBox = (TextBox)sender;
var text = textBox.Text;
var autoCompleteText = SearchBox.AutoCompleteTextBlock.Text;
if (string.IsNullOrEmpty(text))
if (MainViewModel.ShouldAutoCompleteTextBeEmpty(text, autoCompleteText))
{
SearchBox.AutoCompleteTextBlock.Text = string.Empty;
}