v0.4.0 b6be3a8

scene_float_order_test.go RawHistoryFolder

1package vulkan
2
3import (
4	"image"
5	"testing"
6
7	"github.com/bnema/neferwl/internal/ports"
8)
9
10func TestSceneBelowFloatBoundary(t *testing.T) {
11	r := &Renderer{width: 80, height: 60}
12	s := ports.Scene{Border: ports.Border{Active: "#ffffff"}, Windows: []ports.SceneWindow{
13		{ID: 1, Floating: true, Below: true, Rect: ports.Rect{W: 80, H: 60}},
14		{ID: 2, Rect: ports.Rect{W: 40, H: 60}},
15	}, Separators: []ports.Separator{{Rect: ports.Rect{W: 80, H: 1}, Active: true}}}
16	draws := func() []draw { return r.draws(s, nil, newDamage(&target{}, s, image.Rect(0, 0, 80, 60))) }
17	ds := draws()
18	if len(ds) != 3 || ds[0].pc.rect[2] != 80 || ds[1].pc.rect[2] != 40 || ds[2].pc.rect[3] != 1 {
19		t.Fatalf("below float / tile / lines: %+v", ds)
20	}
21	s.Dim = 0.4
22	s.Windows = append(s.Windows, ports.SceneWindow{ID: 3, Floating: true, Rect: ports.Rect{X: 50, W: 20, H: 20}})
23	ds = draws()
24	if len(ds) != 5 || ds[3].pc.color != [4]float32{0, 0, 0, 0.4} || ds[4].pc.rect[0] != 50 {
25		t.Fatalf("veil boundary: %+v", ds)
26	}
27	// An overview preview of a float is not a float above the tiles: the
28	// tile lines follow the last window.
29	s.Dim = 0
30	s.Windows = []ports.SceneWindow{
31		{ID: 1, Floating: true, Preview: 0.5, Rect: ports.Rect{W: 40, H: 30}},
32		{ID: 2, Preview: 0.5, Rect: ports.Rect{X: 40, W: 40, H: 30}},
33	}
34	ds = draws()
35	if len(ds) != 3 || ds[2].pc.rect[3] != 1 {
36		t.Fatalf("preview boundary: %+v", ds)
37	}
38}

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 25

Tags 10

↑↓ moveenter openesc close