mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-06 07:38:21 +00:00
macos: clean up menu
This commit is contained in:
@@ -263,12 +263,6 @@
|
||||
<action selector="find:" target="-1" id="PeY-3u-IxC"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Selection for Find" id="TDN-42-Bu7">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="selectionForFind:" target="-1" id="rhL-7g-XQQ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Find Next" id="XqU-X8-q32">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
@@ -288,6 +282,13 @@
|
||||
<action selector="findHide:" target="-1" id="hGP-K9-yN9"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="2N8-Xz-RVc"/>
|
||||
<menuItem title="Use Selection for Find" id="TDN-42-Bu7">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="selectionForFind:" target="-1" id="rhL-7g-XQQ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
|
||||
@@ -406,7 +406,6 @@ extension Notification.Name {
|
||||
|
||||
/// Focus the search field
|
||||
static let ghosttySearchFocus = Notification.Name("com.mitchellh.ghostty.searchFocus")
|
||||
static let ghosttySelectionForSearch = Notification.Name("com.mitchellh.ghostty.selectionForSearch")
|
||||
}
|
||||
|
||||
// NOTE: I am moving all of these to Notification.Name extensions over time. This
|
||||
|
||||
@@ -479,13 +479,6 @@ extension Ghostty {
|
||||
isSearchFieldFocused = true
|
||||
}
|
||||
}
|
||||
.onReceive(NotificationCenter.default.publisher(for: .ghosttySelectionForSearch)) { notification in
|
||||
guard notification.object as? SurfaceView === surfaceView else { return }
|
||||
if let userInfo = notification.userInfo, let text = userInfo["text"] as? String {
|
||||
searchState.needle = text
|
||||
// We do not focus the textfield after the action to match macOS behavior
|
||||
}
|
||||
}
|
||||
.background(
|
||||
GeometryReader { barGeo in
|
||||
Color.clear.onAppear {
|
||||
|
||||
Reference in New Issue
Block a user