main bcc9a45

inputrects.go RawHistoryFolder

1package ui
2
3import (
4	"fmt"
5	"math"
6)
7
8// Rect is an integer logical-pixel rectangle in surface coordinates.
9type Rect struct{ X, Y, Width, Height int32 }
10
11// SetInputRects stages the input region for the surface: pointer input outside
12// the rectangles passes through. Renderer reports it in Output.InputRects when
13// it changes. nil restores the whole surface, and a non-nil empty slice makes
14// the surface click-through. Rects need positive size. The slice is copied, so
15// callers may reuse it; an unchanged region costs nothing.
16func (f *Frame) SetInputRects(rects []Rect) error {
17	if !f.active {
18		panic("nefergui: SetInputRects outside frame")
19	}
20	for i, r := range rects {
21		if r.Width <= 0 || r.Height <= 0 || int64(r.X)+int64(r.Width) > math.MaxInt32 || int64(r.Y)+int64(r.Height) > math.MaxInt32 {
22			return fmt.Errorf("nefergui: input rect %d %+v is empty or overflows", i, r)
23		}
24	}
25	o := f.owner
26	o.inputNil = rects == nil
27	o.inputRects = append(o.inputRects[:0], rects...)
28	o.inputStaged = true
29	return nil
30}

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