Panes open beside by default; columns stack as the strip does; peek and drag
Enter, l and a click (a Ctrl-, Cmd- or middle click too) open into the next column beside what is there; Shift+Enter and a Shift-click open in place of the focused branch's pane there. Opening what is open focuses it; a second Enter on an open row keeps it. A document from the menu or /open still opens in place. A crowded column now stacks its panes the way the strip stacks columns, by the same code (stack.ts): each pane stuck a tab below the one before, the one looked at whole, the others slid under it, partly and at the limit down to a tab, a pinned one never covered. What is covered down to its strip is not painted. The mouse resting on a covered pane, tab or spine peeks it out over its neighbours; a click makes it the active pane. A pane's grip, the band above its title, or its tab drags it up or down its column (Esc cancels). Curves from words start at the end of their underline. Curves keep their elements and are drawn on a layer of their own, so a change repaints only what moved; with many curves in a gutter, lanes are ordered by swapping neighbours. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014yB6q4BHMwptTX3YFtkRab
This commit is contained in:
1 parent
7a2df56440
commit
3789255147
13 files changed
+783
-254
No files matched your search
+4
-9
@@ -507,8 +507,8 @@ export function App() {
|
||||
if (!store.ready) return <div class="loading">Loading…</div>;
|
||||
|
||||
const panes = store.panes;
|
||||
// Shift-, Ctrl- or Cmd-click (and a middle click) opens a fork: beside what is open, not instead of it.
|
||||
const onClick = (e: MouseEvent) => store.withFork(e.shiftKey || e.ctrlKey || e.metaKey || e.button === 1, () => click(e));
|
||||
// A click opens beside what is open (so do Ctrl-, Cmd- and middle clicks); a Shift-click in its place.
|
||||
const onClick = (e: MouseEvent) => store.withReplace(e.shiftKey, () => click(e));
|
||||
const click = (e: MouseEvent) => {
|
||||
if (store.mode === "edit") return;
|
||||
const target = e.target as HTMLElement;
|
||||
@@ -588,7 +588,7 @@ export function App() {
|
||||
return;
|
||||
}
|
||||
// A drag selection inside one body becomes the focus range.
|
||||
if (selection && !selection.isCollapsed && !store.forking) {
|
||||
if (selection && !selection.isCollapsed && !store.replacing) {
|
||||
const a = locate(selection.anchorNode, selection.anchorOffset);
|
||||
const b = locate(selection.focusNode, selection.focusOffset);
|
||||
if (a && b && a.id === b.id && a.at !== b.at) {
|
||||
@@ -626,12 +626,7 @@ export function App() {
|
||||
if (row) {
|
||||
const id = row.dataset.row as NodeId;
|
||||
if (panes && id !== store.top) {
|
||||
// In panes a click shows the row's pane: focus it and open it next. On the focused row whose pane is showing, it closes that pane.
|
||||
const next = store.trail[paneIndex + 1];
|
||||
if (!store.forking && store.focus.node === id && store.focus.grain === "node" && next?.kind === "node" && next.id === id) {
|
||||
store.closeRow(paneIndex, id);
|
||||
return;
|
||||
}
|
||||
// In panes a click shows the row's pane: focus it and open it next (or focus it where it is open).
|
||||
store.paneAt = paneIndex;
|
||||
store.go(id);
|
||||
store.open.add(id);
|
||||
|
||||
Reference in new issue
Block a user