diff --git a/src/Views/RevisionFiles.axaml.cs b/src/Views/RevisionFiles.axaml.cs index 007c58ef..f748fb0d 100644 --- a/src/Views/RevisionFiles.axaml.cs +++ b/src/Views/RevisionFiles.axaml.cs @@ -155,11 +155,7 @@ namespace SourceGit.Views private void OnSearchBoxTextChanged(object _, TextChangedEventArgs e) { - var vm = DataContext as ViewModels.CommitDetail; - if (vm == null) - return; - - if (string.IsNullOrEmpty(vm.RevisionFileSearchFilter)) + if (string.IsNullOrEmpty(TxtSearchRevisionFiles.Text)) FileTree.SetSearchResult(null); }