Skip to content

feat: default search to case-insensitive - #3023

Open
jelloeater-agent wants to merge 1 commit into
sinelaw:masterfrom
jelloeater-agent:feat/search-case-insensitive-default
Open

feat: default search to case-insensitive#3023
jelloeater-agent wants to merge 1 commit into
sinelaw:masterfrom
jelloeater-agent:feat/search-case-insensitive-default

Conversation

@jelloeater-agent

Copy link
Copy Markdown

Summary

Change the default of the buffer/editor search to be case-insensitive (like micro). New searches now match case-insensitively without any toggling.

What changed

  • crates/fresh-editor/src/app/window/mod.rs: flip the initial search_case_sensitive from true to false. This runtime field drives both the search toggle and new searches.

Behavior intentionally unchanged:

  • The per-search toggle_search_case_sensitive action and the [x] Case Sensitive status-bar checkbox work exactly as before (default is now [ ], toggling flips it).
  • Serialized workspace state: SearchOptions already serde-defaults to false; saved states that explicitly stored case_sensitive are still restored as saved.
  • No smart-case behavior, no new config keys.

Why just this one field

SearchOptions::default() already yields case_sensitive: false via #[serde(default)], but the runtime search_case_sensitive field on Window was initialized to true, which drove every new search. Flipping the init is the minimal, root-cause change.

Tests

  • Updated test_toggle_case_sensitive_in_search (e2e) to assert the checkbox is now unchecked ([ ]) by default and checked ([x]) after Alt+C.
  • Verified: cargo check -p fresh-editor compiles; cargo fmt --check clean; e2e e2e::search:: 48/48 pass, search_replace 50/50 pass (2 ignored, pre-existing); workspace serialization unit tests (test_search_options_serialization, test_full_workspace_round_trip, test_workspace_file_save_load) pass.

Flip the initial search_case_sensitive to false so new searches match
case-insensitively (micro-like) without toggling. The per-search
toggle and serialized workspace state are unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant