v0.10.0 d5d679d

fullredraw_test.go RawHistoryFolder

1package vulkan
2
3import (
4	"image"
5	"testing"
6
7	"github.com/bnema/neferwl/internal/ports"
8)
9
10// Each whole-window redraw is counted under its reason, so the stats tell
11// a client claiming full damage from a history too short.
12func TestFullRedrawReasons(t *testing.T) {
13	rect := image.Rect(0, 0, 10, 10)
14	held := &target{valid: true, windows: map[ports.WindowID]heldWindow{1: {seq: 1, rect: rect}}}
15	var why fullRedraws
16	d := &damageRegion{held: held, seen: map[ports.WindowID]bool{}, drawn: map[ports.WindowID]heldWindow{}, bound: rect, why: &why}
17	pixels := ports.SurfaceContent{Width: 10, Height: 10, SHM: &ports.SHMBuffer{}}
18
19	known := pixels
20	known.ID, known.Seq = 1, 2
21	known.DamageHistory = []ports.SeqDamage{{Seq: 2, Rects: []ports.Rect{{W: 1, H: 1}}}}
22	d.window(1, known, rect)
23	if why != (fullRedraws{}) {
24		t.Fatalf("partial damage counted as full: %v", why)
25	}
26
27	d.seen = map[ports.WindowID]bool{}
28	gap := pixels
29	gap.ID, gap.Seq = 1, 9
30	gap.DamageHistory = []ports.SeqDamage{{Seq: 9, Rects: []ports.Rect{{W: 1, H: 1}}}}
31	d.window(1, gap, rect)
32	d.window(2, gap, rect)
33	if why[fullHistory] != 1 || why[fullNewWindow] != 1 {
34		t.Fatalf("reasons %v", why)
35	}
36	if got := why.take(); got[fullHistory] != 1 || why != (fullRedraws{}) {
37		t.Fatalf("take %v left %v", got, why)
38	}
39}

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 23

Tags 10

↑↓ moveenter openesc close