Exemplo n.º 1
0
 private void OnHistoryChanged(object sender, EventArgs e)
 {
     if (RToolsSettings.Current.ClearFilterOnAddHistory)
     {
         SearchHost.SearchAsync(null);
     }
 }
Exemplo n.º 2
0
        private void OnHistoryChanged(object sender, EventArgs e)
        {
            var settings = Services.GetService <IRSettings>();

            if (settings.ClearFilterOnAddHistory)
            {
                SearchHost.SearchAsync(null);
            }
        }
Exemplo n.º 3
0
        void UpdateSearchHost(bool enabled, string query)
        {
            if (SearchHost != null)
            {
                SearchHost.IsEnabled = enabled;

                if (SearchHost.SearchQuery?.SearchString != query)
                {
                    SearchHost.SearchAsync(query != null ? new SearchQuery(query) : null);
                }
            }
        }
Exemplo n.º 4
0
        void UpdateSearchHost(bool enabled, string query)
        {
            ThreadHelper.ThrowIfNotOnUIThread();

            if (SearchHost != null)
            {
                SearchHost.IsEnabled = enabled;

                if (SearchHost.SearchQuery?.SearchString != query)
                {
                    SearchHost.SearchAsync(query != null ? new SearchQuery(query) : null);
                }
            }
        }
Exemplo n.º 5
0
        void UpdateSearchHost(bool enabled, string query)
        {
            if (SearchHost != null)
            {
                SearchHost.IsEnabled = enabled;

                var searchString = SearchHost.SearchQuery?.SearchString;
                if (searchString?.Trim() != query?.Trim())
                {
                    // SearchAsync will crash the process if we send it a duplicate string.
                    // There is a SearchTrimsWhitespace setting that makes searched with leading or trailing
                    // white-space appear as duplicates. We compare the query with trimmed white-space to avoid this.
                    // https://github.com/github/VisualStudio/issues/1948
                    SearchHost.SearchAsync(query != null ? new SearchQuery(query) : null);
                }
            }
        }