Fix buffer search options not resetting when dismissed after Vim mode search then reopened with buffer: deploy search (#25838)

Closes #25315

Release Notes:

- Fixes an issue where the buffer search options would not be reset when
using `buffer: deploy search` after using Vim search (`*` & `#`) which
enable all search options
This commit is contained in:
Ben Kunkle 2025-02-28 18:59:22 -06:00 committed by GitHub
parent eb648dd096
commit 694afd15c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -814,7 +814,10 @@ impl BufferSearchBar {
self.configured_options =
SearchOptions::from_settings(&EditorSettings::get_global(cx).search);
if self.dismissed && self.configured_options != self.default_options {
if self.dismissed
&& (self.configured_options != self.default_options
|| self.configured_options != self.search_options)
{
self.search_options = self.configured_options;
self.default_options = self.configured_options;
}