diff options
| author | Gabriel Schneider <[email protected]> | 2026-08-11 18:30:13 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-12 13:04:32 -0300 |
| commit | b424164922842796619cb6894ec46d729a8a6826 (patch) | |
| tree | bd4653accfaeb67012f4e7257c61eaf4fb12c892 /test/snapshots/exec-bigdrag.golden | |
| parent | 08f32cdde672740b71608f3dfccd629dcbac78f7 (diff) | |
| download | pardes-b424164922842796619cb6894ec46d729a8a6826.tar.gz pardes-b424164922842796619cb6894ec46d729a8a6826.zip | |
clipboard, n/N and the tty prompt: three things that were half-wired
Three changes that all turned out to be the same shape -- a feature that
worked in one direction, or for one pane kind, and quietly did not in the
others.
CLIPBOARD. Every register write emitted set_clipboard, so deleting one
character threw away whatever the desktop was holding; multi-cursor yank took
the join's early return and emitted nothing at all, so the same key reached
the clipboard on one cursor and not on two. Nothing could READ the clipboard:
the SDL shell had no SDL_GetClipboardText anywhere in it, and the tty shell
never asked for OSC 52, so `p` from another application was dead in both.
Now it is helix's split. y/d/c/p/P/R and the acme chords are the DEFAULT
REGISTER and nothing else; the system clipboard is five words on helix's own
letters -- SPC y, SPC Y, SPC p, SPC P, SPC R -- spelled as builtins so they
land in Help and are executable like every other verb. The one exception is
the tag `y` chord, which still mirrors out because a tag is always insert, so
SPC cannot be pressed there, and copying the path out is the whole point of
the chord.
Reading is a new read_clipboard effect answered by an ordinary Event.paste, so
the round trip is honest about being one: SDL and NSPasteboard answer inside
the same drain, the browser answers a promise, and a terminal answers over
OSC 52 or -- far more often -- refuses. A refused read is a paste that does
not happen, and the request dies at the next keystroke rather than landing
minutes late in whatever pane is focused by then.
The tty shell also enables BRACKETED PASTE now and coalesces
paste_start..paste_end into one event. Before this a paste arrived as a flood
of individual key presses: plausible in insert mode, and in normal mode every
pasted character ran as a command.
n/N. They stepped the armed results buffer and immediately Looked each row, so
you could not walk past a hit without opening it. They are a MOTION now:
select the next look-able text, open nothing, and let Enter decide. What they
step is the largest whitespace-delimited run look.resolve can act on
(look.lookableSpan, wrapper punctuation peeled), over a RING of panes -- every
pane that has performed a look, most recent first, then the output buffers
that have not, newest first, and only if both are empty the pane in front of
you. N is the exact inverse of n, computed rather than remembered: both
directions ask the same question about the same spans and compare against the
column the walk parks on, so x presses one way and x back land exactly where
you started, pane boundaries and the ring's seam included.
A ring rather than a list with two ends because a shell's cursor sits at the
prompt, below everything it has printed, so a walk that could not come round
would have nowhere to go on the very first press -- which is the case n/N were
written for.
One motion everywhere, no pane-kind or buffer-kind special case. The only
thing a buffer may change is the GRAIN of what a step selects, and it does it
with one flag rather than a branch: output_pane.Traits.commands (renamed from
`executes`, which named one reader's behaviour rather than the fact) makes a
row select WHOLE, because a ThemeSel line is a word to run and has no path
inside it to pick out. `]d`/`[d` are not n/N -- they are helix's diagnostic
motions, their job is to ARRIVE, and they still reach searchStep.
THE TTY PROMPT. Leaving raw tty blanked the prompt row, and the command you
had typed at that prompt shares the row, so it went too -- a shell out of tty
read as output only. OSC 133 marks the row CELL by cell, so the two are
separable: config.tty_blank = .prompt cuts the prompt's own columns and leaves
the command, left-hugged at column 0 in line with the output under it rather
than in a bay of blanks. .prompt_and_input is the old behaviour, kept.
Because the row is now something you can put a cursor in, enterTty adds the
hidden prompt width back before asking ghostty to walk the shell's own cursor
to it -- the modal column on a cut row is short by exactly that much.
Verified: unit-test 186/186 (nine new), snap 87/87 (new ttyprompt.snap),
hxdiff 481 and hxparity 561 with 0 mismatches, tty and gui both build. And
against the real binaries rather than the harness: in a pty, SPC y emits OSC
52 carrying exactly the selection while plain y emits nothing, SPC p issues
the read and pastes the reply, and a bracketed paste of "dd..." inserts text
instead of deleting two lines. In a real SDL window, SPC y then SPC p round
trips through the system clipboard while the default register holds different
text. Setting tty_blank back to .prompt_and_input reproduces all 86 old
goldens byte for byte.
Diffstat (limited to 'test/snapshots/exec-bigdrag.golden')
| -rw-r--r-- | test/snapshots/exec-bigdrag.golden | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/test/snapshots/exec-bigdrag.golden b/test/snapshots/exec-bigdrag.golden index da0e2467..3cfe6ef9 100644 --- a/test/snapshots/exec-bigdrag.golden +++ b/test/snapshots/exec-bigdrag.golden @@ -1,61 +1,61 @@ == snap alive grid=200x60 cursor=119,37 |New Newcol Find Grep Help Tutor Dump NextColor Debug Kill | /tmp/pardes-snap/exec-bigdrag/cwd New Del /tmp/pardes-snap/exec-bigdrag/cwd New Del -| bash: line: command not found -| big.txt +| ls bash: line: command not found +| big.txt 4line 2705line 2706line 2707line 2708line 2709line 2710line 2711line 2712line 2713line 2714lin | bash: 4line: command not found -| +| 15line 2716line 2717line 2718line 2719line 2720line 2721line 2722line 2723line 2724line 2725li | bash: 15line: command not found -| +| 726line 2727line 2728line 2729line 2730line 2731line 2732line 2733line 2734line 2735line 2736l | bash: 726line: command not found -| +| 2737line 2738line 2739line 2740line 2741line 2742line 2743line 2744line 2745line 2746line 2747 | bash: 2737line: command not found -| +| 2748line 2749line 2750line 2751line 2752line 2753line 2754line 2755line 2756line 2757line 275 | bash: 2748line: command not found -| +| e 2759line 2760line 2761line 2762line 2763line 2764line 2765line 2766line 2767line 2768line 27 | bash: e: command not found -| +| ne 2770line 2771line 2772line 2773line 2774line 2775line 2776line 2777line 2778line 2779line 2 | bash: ne: command not found -| +| ine 2781line 2782line 2783line 2784line 2785line 2786line 2787line 2788line 2789line 2790line | bash: ine: command not found -| +| line 2792line 2793line 2794line 2795line 2796line 2797line 2798line 2799line 2800line 2801line | bash: line: command not found -| +| 2line 2803line 2804line 2805line 2806line 2807line 2808line 2809line 2810line 2811line 2812lin | bash: 2line: command not found -| +| 13line 2814line 2815line 2816line 2817line 2818line 2819line 2820line 2821line 2822line 2823li | bash: 13line: command not found -| +| 824line 2825line 2826line 2827line 2828line 2829line 2830line 2831line 2832line 2833line 2834l | bash: 824line: command not found -| +| 2835line 2836line 2837line 2838line 2839line 2840line 2841line 2842line 2843line 2844line 2845 | bash: 2835line: command not found -| +| 2846line 2847line 2848line 2849line 2850line 2851line 2852line 2853line 2854line 2855line 285 | bash: 2846line: command not found -| /tmp/pardes-snap/exec-bigdrag/cwd New Del -| bash: e: command not found -| big.txt +| /tmp/pardes-snap/exec-bigdrag/cwd New Del e 2857line 2858line 2859line 2860line 2861line 2862line 2863line 2864line 2865line 2866line 28 +| ls bash: e: command not found +| big.txt ne 2868line 2869line 2870line 2871line 2872line 2873line 2874line 2875line 2876line 2877line 2 | bash: ne: command not found -| +| ine 2879line 2880line 2881line 2882line 2883line 2884line 2885line 2886line 2887line 2888line | bash: ine: command not found -| echo alive-o''k +| liecho alive-o''kne 2890line 2891line 2892line 2893line 2894line 2895line 2896line 2897line 2898li | bash: line: command not found -| +| 0line 2901line 2902line 2903line 2904line 2905line 2906line 2907line 2908line 2909line 2910lin | bash: 0line: command not found -| +| 11line 2912line 2913line 2914line 2915line 2916line 2917line 2918line 2919line 2920line 2921li | bash: 11line: command not found -| +| 922line 2923line 2924line 2925line 2926line 2927line 2928line 2929line 2930line 2931line 2932l | bash: 922line: command not found -| +| 2933line 2934line 2935line 2936line 2937line 2938line 2939line 2940line 2941line 2942line 2943 | bash: 2933line: command not found -| +| 2944line 2945line 2946line 2947line 2948line 2949line 2950line 2951line 2952line 2953line 295 | bash: 2944line: command not found -| +| e 2955line 2956line 2957line 2958line 2959line 2960line 2961line 2962line 2963line 2964line 29 | bash: e: command not found -| +| ne 2966line 2967line 2968line 2969line 2970line 2971line 2972line 2973line 2974line 2975line 2 | bash: ne: command not found -| +| ine 2977line 2978line 2979line 2980line 2981line 2982line 2983line 2984line 2985line 2986line | bash: ine: command not found -| +| line 2988line 2989line 2990line 2991line 2992line 2993line 2994line 2995line 2996line 2997line | bash: line: command not found -| +| echo alive-o''k | alive-ok | |
