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
+7
-3
@@ -8,6 +8,8 @@ export const LANE_PITCH = 4;
|
||||
export const LANE_FIRST = 5;
|
||||
export const LANE_LAST = 29;
|
||||
export const LANES = Math.floor((LANE_LAST - LANE_FIRST) / LANE_PITCH) + 1;
|
||||
/** Up to this many curves in a gutter, every lane is tried for each; past it, only the neighbouring lanes. */
|
||||
const MOVES = 8;
|
||||
|
||||
/**
|
||||
* How many times curves in one gutter cross, for an order of lanes (rightmost first): a lead-out
|
||||
@@ -46,12 +48,14 @@ export function laneOrder<T extends { key: string; sy: number; ey: number }>(edg
|
||||
const at = order.findIndex((o) => rule.indexOf(o) > r);
|
||||
order.splice(at < 0 ? order.length : at, 0, e);
|
||||
}
|
||||
// Move one curve to another lane while that removes crossings (a few curves per gutter: cheap).
|
||||
// Move one curve to another lane while that removes crossings: a few curves per gutter, every place
|
||||
// tried; many (past MOVES), only neighbours swapped, which stays cheap enough for every frame.
|
||||
let best = crossings(order);
|
||||
for (let pass = 0, better = true; better && pass < order.length; pass++) {
|
||||
const far = order.length <= MOVES;
|
||||
for (let pass = 0, better = best > 0; better && pass < order.length; pass++) {
|
||||
better = false;
|
||||
for (let i = 0; i < order.length && best; i++)
|
||||
for (let j = 0; j < order.length; j++) {
|
||||
for (let j = far ? 0 : i + 1; j < (far ? order.length : Math.min(order.length, i + 2)); j++) {
|
||||
if (j === i) continue;
|
||||
const moved = order.slice();
|
||||
moved.splice(j, 0, ...moved.splice(i, 1));
|
||||
|
||||
Reference in new issue
Block a user