Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f3609b9
Anchor textbox completions to cursor
lawrencecchen May 30, 2026
72033d6
Reposition textbox completions on window changes
lawrencecchen May 31, 2026
41a3702
Improve textbox mention search indexing
lawrencecchen May 31, 2026
091f963
Show root mentions while file index warms
lawrencecchen May 31, 2026
8db5b31
Open textbox mention popover while loading
lawrencecchen May 31, 2026
d188c72
Address textbox mention review feedback
lawrencecchen May 31, 2026
8771467
Ignore textbox completion panel in close shortcut lint
lawrencecchen May 31, 2026
841770e
Merge remote-tracking branch 'origin/main' into feat-textbox-autocomp…
lawrencecchen Jun 1, 2026
c0fb6fd
Address textbox mention review feedback
lawrencecchen Jun 1, 2026
29d3c16
Move textbox mention tests to Swift Testing
lawrencecchen Jun 1, 2026
f218a5e
Fix textbox mention completion races
lawrencecchen Jun 1, 2026
005b2f0
Use shared ripgrep resolver for textbox mentions
lawrencecchen Jun 1, 2026
7fc0375
Fix textbox mention stale refresh paths
lawrencecchen Jun 1, 2026
5c30823
Address textbox mention review edge cases
lawrencecchen Jun 1, 2026
7c7f26a
Fix textbox mention markdown and scanner waiters
lawrencecchen Jun 1, 2026
0ebc06c
Normalize textbox mention control navigation
lawrencecchen Jun 2, 2026
26e80b4
Prioritize local textbox mention skills
lawrencecchen Jun 2, 2026
2716edf
Fix textbox mention key routing edge cases
lawrencecchen Jun 2, 2026
4c40f29
Stamp textbox mention cache on completion
lawrencecchen Jun 2, 2026
31ef694
Update textbox mention stale return test
lawrencecchen Jun 2, 2026
81f0e9a
Fix mention index warning
lawrencecchen Jun 2, 2026
47f2cc5
Address textbox mention review feedback
lawrencecchen Jun 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Sources/App/ShortcutRoutingSupport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,28 @@ func shouldDispatchTextBoxInputArrowViaFirstResponderKeyDown(
}
}

/// Ctrl-N / Ctrl-P navigate the mention-completion popover (and emacs-style line
/// movement) inside the terminal textbox. Like plain arrows, the window's
/// `performKeyEquivalent` claims these before they reach the textbox `keyDown`, so
/// they must be routed to the first responder explicitly. Scoped to the textbox so
/// terminal/browser Ctrl-N/Ctrl-P are unaffected.
func shouldDispatchTextBoxInputControlNavViaFirstResponderKeyDown(
keyCode: UInt16,
firstResponderIsTextBoxInput: Bool,
firstResponderHasMarkedText: Bool = false,
flags: NSEvent.ModifierFlags
) -> Bool {
guard firstResponderIsTextBoxInput else { return false }
guard !firstResponderHasMarkedText else { return false }

let normalizedFlags = flags
.intersection(.deviceIndependentFlagsMask)
.subtracting([.numericPad, .function, .capsLock])
guard normalizedFlags == [.control] else { return false }
// kVK_ANSI_N == 45, kVK_ANSI_P == 35
return keyCode == 45 || keyCode == 35
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.
Outdated
}

func shouldToggleMainWindowFullScreenForCommandControlFShortcut(
flags: NSEvent.ModifierFlags,
chars: String,
Expand Down
16 changes: 16 additions & 0 deletions Sources/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15790,6 +15790,7 @@ private var cmuxBrowserArrowForwardingDepth = 0
private var cmuxBrowserOmnibarMarkedTextForwardingDepth = 0
private var cmuxCommandPaletteArrowForwardingDepth = 0
private var cmuxTextBoxInputArrowForwardingDepth = 0
private var cmuxTextBoxInputControlNavForwardingDepth = 0
private var cmuxWindowFirstResponderBypassDepth = 0
private var cmuxFieldEditorOwningWebViewAssociationKey: UInt8 = 0

Expand Down Expand Up @@ -16614,6 +16615,21 @@ private extension NSWindow {
return true
}

if shouldDispatchTextBoxInputControlNavViaFirstResponderKeyDown(
keyCode: event.keyCode,
firstResponderIsTextBoxInput: firstResponderIsTextBoxInput,
firstResponderHasMarkedText: firstResponderHasMarkedText,
flags: event.modifierFlags
) {
if cmuxTextBoxInputControlNavForwardingDepth > 0 {
return false
}
cmuxTextBoxInputControlNavForwardingDepth += 1
defer { cmuxTextBoxInputControlNavForwardingDepth = max(0, cmuxTextBoxInputControlNavForwardingDepth - 1) }
self.firstResponder?.keyDown(with: event)
return true
}

// Web forms rely on Return/Enter flowing through keyDown. If the original
// NSWindow.performKeyEquivalent consumes Enter first, submission never reaches
// WebKit. Route Return/Enter directly to the current first responder and
Expand Down
Loading
Loading