feat: default search to case-insensitive - #3023
Open
jelloeater-agent wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 initialsearch_case_sensitivefromtruetofalse. This runtime field drives both the search toggle and new searches.Behavior intentionally unchanged:
toggle_search_case_sensitiveaction and the[x] Case Sensitivestatus-bar checkbox work exactly as before (default is now[ ], toggling flips it).SearchOptionsalready serde-defaults tofalse; saved states that explicitly storedcase_sensitiveare still restored as saved.Why just this one field
SearchOptions::default()already yieldscase_sensitive: falsevia#[serde(default)], but the runtimesearch_case_sensitivefield onWindowwas initialized totrue, which drove every new search. Flipping the init is the minimal, root-cause change.Tests
test_toggle_case_sensitive_in_search(e2e) to assert the checkbox is now unchecked ([ ]) by default and checked ([x]) afterAlt+C.cargo check -p fresh-editorcompiles;cargo fmt --checkclean; e2ee2e::search::48/48 pass,search_replace50/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.