vim: Fix :s command ignoring case sensitivity settings (#42457)

Closes #36260 

This PR fixes the vim :s Command Ignores Case Sensitivity Settings

Release Notes:

- N/A
This commit is contained in:
Hans 2025-12-02 11:22:22 +08:00 committed by GitHub
parent e27590432f
commit 04e92fb2d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -506,7 +506,12 @@ impl Vim {
search_bar.is_contains_uppercase(&search),
);
} else {
options.set(SearchOptions::CASE_SENSITIVE, false)
// Fallback: no explicit i/I flags and smartcase disabled;
// use global editor.search.case_sensitive.
options.set(
SearchOptions::CASE_SENSITIVE,
EditorSettings::get_global(cx).search.case_sensitive,
)
}
if !replacement.flag_g {