v0.1.0 47aaa0f

clipboard.md RawHistoryFolder

Clipboard adapter

Clipboard is constructed on the session loop with a seat, a function returning the most recent keyboard enter/key serial, and a reader-to-loop event post function. Deliver each ClipboardEvent to ApplyClipboard on that loop. A missing wl_data_device_manager returns nil (clipboard unavailable). Selection offers have independent MIME sets. Only the latest selected offer is used; superseded offers and old sources are destroyed. Selection write offers text/plain;charset=utf-8, UTF8_STRING, and text/plain. The same priority is used when choosing a MIME for reads. FD-bearing send events transfer their OwnedFD to a bounded-time writer; read transfers are bounded at the caller's limit plus one byte (at most edit.MaxClipboardBytes+1) and timed out after three seconds. Close the adapter before tearing down the data-device manager.

The synchronous edit.Clipboard.ReadText contract would deadlock the UI loop: Wayland receive requires another process to write a pipe while the UI must continue dispatching. Therefore edit.AsyncClipboard is an additive port. ReadTextAsync starts the transfer without waiting for the peer; its completion callback runs on a worker and must enqueue a value for the next UI frame. Never mutate the editor in that callback. Call edit.State.PasteAsync on the UI loop to validate UTF-8 and bounds and apply the result. Synchronous ReadText explicitly returns an error rather than blocking.

Drag-and-drop is unsupported in V1. The data-device enter offer is tracked separately from selection and discarded on leave, drop, or a subsequent enter; selection replacement must not destroy an active drag offer.

source
1# Clipboard adapter
2
3`Clipboard` is constructed on the session loop with a seat, a function returning
4the most recent keyboard enter/key serial, and a **reader-to-loop** event post
5function. Deliver each `ClipboardEvent` to `ApplyClipboard` on that loop.
6A missing `wl_data_device_manager` returns nil (clipboard unavailable).
7Selection offers have independent MIME sets. Only the latest selected offer is
8used; superseded offers and old sources are destroyed. Selection write offers
9`text/plain;charset=utf-8`, `UTF8_STRING`, and `text/plain`. The same priority
10is used when choosing a MIME for reads. FD-bearing send events transfer their
11`OwnedFD` to a bounded-time writer; read transfers are bounded at the caller's
12limit plus one byte (at most `edit.MaxClipboardBytes+1`) and timed out after
13three seconds. Close the adapter before tearing down the data-device manager.
14
15The synchronous `edit.Clipboard.ReadText` contract would deadlock the UI loop:
16Wayland receive requires another process to write a pipe while the UI must
17continue dispatching. Therefore `edit.AsyncClipboard` is an additive port.
18`ReadTextAsync` starts the transfer without waiting for the peer; its completion
19callback runs on a **worker** and must enqueue a value for the next UI frame.
20Never mutate the editor in that callback. Call `edit.State.PasteAsync` on the
21UI loop to validate UTF-8 and bounds and apply the result. Synchronous
22`ReadText` explicitly returns an error rather than blocking.
23
24Drag-and-drop is unsupported in V1. The data-device enter offer is tracked
25separately from selection and discarded on leave, drop, or a subsequent enter;
26selection replacement must not destroy an active drag offer.

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 12

↑↓ moveenter openesc close