cmux/Sources
Lawrence Chen 044a3dbb64
Vi mode: half-page scroll, visible cursor, gg fix (#851)
* Vi mode P0 improvements: half-page scroll, visible cursor, gg fix

Three changes to keyboard copy mode (vi mode):

1. Ctrl+U/D now scroll half-page (was full-page). Ctrl+B/F remain
   full-page. Uses Ghostty's scroll_page_fractional binding.

2. Entering copy mode now creates a 1-cell selection at the terminal
   cursor via select_cursor_cell, giving the user a visible cursor
   indicator. Visual mode (v) is tracked separately from Ghostty's
   has_selection so the cursor selection doesn't make every motion
   behave as visual. Exiting visual mode (v again) collapses back
   to the cursor cell.

3. Single 'g' is now a prefix key requiring 'gg' to scroll to top,
   matching standard vim behavior. Uses the same pendingG state
   machine pattern as pendingYankLine for 'yy'.

Part of https://github.com/manaflow-ai/cmux/issues/846

* Fix viewport row refresh with persistent cursor selection

The 1-cell cursor selection made refreshKeyboardCopyModeViewportRowFromVisibleAnchor
always bail (has_selection was always true). Guard on keyboardCopyModeVisualActive
instead so viewport row updates work after scrolling in non-visual mode. Also
re-creates the cursor cell after refresh to preserve visibility.

Additionally: use performBindingAction(_:repeatCount:) for scrollHalfPage,
add state-reset assertion to testGGWithSelectionAdjustsToHome.

Addresses review feedback from CodeRabbit, Cubic, Codex, and Greptile.
2026-03-03 23:56:01 -08:00
..
Find Break terminal find overlay retain cycle 2026-02-22 16:29:35 -08:00
Panels Fix ghost terminal surface rebind after close (#808) 2026-03-03 15:20:42 -08:00
Update Fix notification bell hover crash by conditionally tracking hover (#574) 2026-02-26 14:26:28 -08:00
AppDelegate.swift Add keyboard copy mode for terminal scrollback (#792) 2026-03-03 19:01:21 -08:00
Backport.swift Polish browser suggestions, focus, and tagged reload flow 2026-02-14 21:33:28 -08:00
BrowserWindowPortal.swift Fix double-click titlebar zoom not working on browser panel side 2026-02-24 14:35:10 -08:00
cmuxApp.swift Fix settings dropdown for Sidebar Branch Layout taking full width (#825) 2026-03-03 18:21:02 -08:00
ContentView.swift Add setting to hide Cmd-hold shortcut hints (#765) 2026-03-02 19:56:27 -08:00
GhosttyConfig.swift Honor Ghostty background-opacity across all cmux chrome (#667) 2026-03-01 03:48:46 -08:00
GhosttyTerminalView.swift Vi mode: half-page scroll, visible cursor, gg fix (#851) 2026-03-03 23:56:01 -08:00
KeyboardLayout.swift Fix Cmd+plus zoom handling on non-US layouts (#680) 2026-02-28 00:16:03 -08:00
KeyboardShortcutSettings.swift Add keyboard copy mode for terminal scrollback (#792) 2026-03-03 19:01:21 -08:00
NotificationsPage.swift Adopt custom blue accent across active UI states 2026-02-24 14:22:58 -08:00
PortScanner.swift Avoid main-thread hops for explicit socket scope 2026-02-20 23:58:47 -08:00
PostHogAnalytics.swift Add telemetry opt-out setting (#610) 2026-02-26 22:02:29 -08:00
SentryHelper.swift Auto-heal missing CLI listener socket (#679) 2026-02-28 01:19:38 -08:00
SessionPersistence.swift Fix session restore routing and browser history persistence 2026-02-24 14:34:55 -08:00
SidebarSelectionState.swift Implement session persistence pass 1 with multi-window restore 2026-02-22 15:39:59 -08:00
SocketControlSettings.swift Fix Xcode Cloud UI tests by running TestAction in Debug (#672) 2026-02-28 01:48:49 -08:00
TabManager.swift Add keyboard copy mode for terminal scrollback (#792) 2026-03-03 19:01:21 -08:00
TerminalController.swift Clear sidebar notification when user submits prompt (#821) 2026-03-03 18:48:32 -08:00
TerminalNotificationStore.swift Move UNUserNotificationCenter remove calls off main thread (#820) 2026-03-03 17:42:10 -08:00
TerminalView.swift Add sidebar blur effect with withinWindow blending (#9) 2026-02-04 03:04:45 -08:00
TerminalWindowPortal.swift Fix ghost terminal surface rebind after close (#808) 2026-03-03 15:20:42 -08:00
UITestRecorder.swift Fix frozen terminals after split churn (#12) 2026-02-13 16:45:31 -08:00
WindowAccessor.swift Polish browser suggestions, focus, and tagged reload flow 2026-02-14 21:33:28 -08:00
WindowDecorationsController.swift Refine settings/about titlebar styling and controls alignment 2026-02-14 02:11:35 -08:00
WindowDragHandleView.swift Fix re-entrant exclusive-access crash in drag handle hit test (#771) 2026-03-02 19:20:14 -08:00
WindowToolbarController.swift Coalesce title notification updates to reduce main-thread hangs 2026-02-20 20:14:19 -08:00
Workspace.swift Fix ghost terminal surface rebind after close (#808) 2026-03-03 15:20:42 -08:00
WorkspaceContentView.swift Honor Ghostty background-opacity across all cmux chrome (#667) 2026-03-01 03:48:46 -08:00