Skip to content

Commit 848e604

Browse files
committed
Update Omnibar.Events.cs
1 parent 5801f58 commit 848e604

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/Files.App.Controls/Omnibar/Omnibar.Events.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,16 +131,12 @@ private void AutoSuggestBox_TextChanged(object sender, TextChangedEventArgs e)
131131

132132
// UpdateSuggestionListView();
133133

134-
if (_textChangeReason is not OmnibarTextChangeReason.SuggestionChosen and
135-
not OmnibarTextChangeReason.ProgrammaticChange)
134+
if (_textChangeReason is OmnibarTextChangeReason.ProgrammaticChange)
135+
_textBox.SelectAll();
136+
else
136137
{
137-
if (_textChangeReason is OmnibarTextChangeReason.None)
138-
_textChangeReason = OmnibarTextChangeReason.UserInput;
139-
140138
_userInput = _textBox.Text;
141139
}
142-
else if (_textChangeReason is OmnibarTextChangeReason.ProgrammaticChange)
143-
_textBox.SelectAll();
144140

145141
TextChanged?.Invoke(this, new(CurrentSelectedMode, _textChangeReason));
146142

0 commit comments

Comments
 (0)