Add find-in-scrollback, unicode11, and keyboard pane navigation
Three xterm.js features, implemented together because they share the XtermPane mount + the single attachCustomKeyEventHandler: - Unicode 11: load @xterm/addon-unicode11, set activeVersion='11' after the canvas renderer so emoji/CJK/box-drawing widths stop drifting. - Find in scrollback: @xterm/addon-search + a new per-pane SearchBar overlay (Ctrl+Shift+F to open, Enter/Shift+Enter next/prev, regex + case toggles, Esc to close & refocus). Overlay is an absolutely- positioned sibling in a position:relative wrapper so fit() is unaffected. - Pane navigation: Ctrl+Alt+Arrow / Ctrl+Alt+HJKL (spatial neighbour via findNeighborInDirection) and Alt+1..9 (Nth leaf in walkLeaves order). XtermPane emits a NavigateIntent; App resolves the target leaf and sets it active, reusing the existing isActive->focusTrigger refocus chain. All chords live in one attachCustomKeyEventHandler (xterm replaces the handler on each call). Shortcuts added to shortcuts.ts (SoT for README + Help), including the Alt+digit shell-conflict caveat. tsc clean apart from the three not-yet-installed addon modules. Needs pnpm install on the Windows host + runtime verification. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
8bb080345e
commit
baa00dfc5c
8 changed files with 526 additions and 29 deletions
|
|
@ -66,7 +66,23 @@ export const SHORTCUT_SECTIONS: ShortcutSection[] = [
|
|||
{ keys: "Ctrl+K", description: "Open jump-to-pane palette" },
|
||||
{
|
||||
keys: "Ctrl+Shift+← / → / ↑ / ↓",
|
||||
description: "Focus neighbour pane in that direction",
|
||||
description:
|
||||
"Focus neighbour pane in that direction (window-level — works even when no terminal is focused)",
|
||||
},
|
||||
{
|
||||
keys: "Ctrl+Alt+← / → / ↑ / ↓",
|
||||
description:
|
||||
"Focus neighbour pane in that direction (from inside the terminal — intercepted before the PTY sees it)",
|
||||
},
|
||||
{
|
||||
keys: "Ctrl+Alt+H / J / K / L",
|
||||
description:
|
||||
"Same as Ctrl+Alt+Arrow but in Vim-style HJKL order (left / down / up / right)",
|
||||
},
|
||||
{
|
||||
keys: "Alt+1 … Alt+9",
|
||||
description:
|
||||
"Focus the Nth pane in layout order (DFS: left-to-right, top-to-bottom); clamped to pane count. Note: swallows bare Alt+digit — shells using readline digit-argument or vim buffer-jump may conflict.",
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
@ -100,6 +116,18 @@ export const SHORTCUT_SECTIONS: ShortcutSection[] = [
|
|||
keys: "Ctrl+Shift+C / Ctrl+Shift+V",
|
||||
description: "Copy selection / paste in terminal",
|
||||
},
|
||||
{
|
||||
keys: "Ctrl+Shift+F",
|
||||
description: "Open find-in-scrollback bar for the focused pane",
|
||||
},
|
||||
{
|
||||
keys: "Enter / Shift+Enter",
|
||||
description: "Next / previous match (while search bar is focused)",
|
||||
},
|
||||
{
|
||||
keys: "Escape",
|
||||
description: "Close find bar and return focus to terminal",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue