Add inline find bar as an alternative to the floating find/replace panel#1642
Open
valsong wants to merge 1 commit intomacvim-dev:masterfrom
Open
Add inline find bar as an alternative to the floating find/replace panel#1642valsong wants to merge 1 commit intomacvim-dev:masterfrom
valsong wants to merge 1 commit intomacvim-dev:masterfrom
Conversation
Previously, Cmd+F opened a floating NSPanel (MMFindReplaceController). This commit introduces an optional inline find bar (MMFindBarView) that appears as an overlay anchored to the top-right corner of the text area, similar to the find bar in VS Code and other modern editors. The inline mode is controlled by a new "Find bar: Inline" preference in the General pane (off by default, preserving existing behaviour). Changes: - Add MMFindBarView: a programmatic NSView overlay with find/replace fields, Ignore Case / Match Word checkboxes, Replace / Replace All / Previous / Next buttons, and an MMHoverButton close button styled to match the tab close button - The bar is freely draggable within the text-editing area and snaps to the top-right corner only on first show; subsequent Cmd+F presses preserve the user's dragged position - Window resize and tab-bar show/hide keep the bar in place via a delta-based repositioning algorithm - Add MMFindBarInlineKey user default and register it (default NO) - Add "Find bar" toggle to the General preferences pane - Route ShowFindReplaceDialogMsgID to the inline bar or the floating panel depending on the preference (MMVimController) - Add -sendFindBarAction:findString:replaceString:ignoreCase:matchWord: to MMWindowController to unify search message dispatch for both modes; fix IBAction tag-to-FRD-flags mapping (tag 2→flags 3, tag 3→flags 4) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
I vote for that change. This solution is more clear what the context is in comparison to a floating window. |
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
Previously, Cmd+F opened a floating NSPanel (MMFindReplaceController). This PR introduces an optional inline find bar (MMFindBarView) that appears as an overlay anchored to the top-right corner of the text area, similar to the find bar in VS Code and other modern
editors.
The inline mode is off by default (preserving existing behaviour) and can be enabled via a new Find bar: Inline toggle in the General preferences pane.
Test plan