detached c929822

fix(lint): address staticcheck findings

commit
c92982216c39031bff748837b569794d8daba635
author
brice · · 2026-08-23 08:39 UTC
parent
b4be9db
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
3 files · +4 -7
M graphics/scene.go +1 -1
@@ -739,7 +739,7 @@ func (s *Snapshot) Asset(id AssetID) (AssetView, bool) {
739739 if !ok {
740740 return AssetView{}, false
741741 }
742- return AssetView{id: record.id, encoded: record.encoded, width: record.width, height: record.height, pixels: record.pixels}, true
742+ return AssetView(record), true
743743 }
744744
745745 // GetAsset is an alias for Asset.
@@ -739,7 +739,7 @@ func (s *Snapshot) Asset(id AssetID) (AssetView, bool) {
739 if !ok {739 if !ok {
740 return AssetView{}, false740 return AssetView{}, false
741 }741 }
742- return AssetView{id: record.id, encoded: record.encoded, width: record.width, height: record.height, pixels: record.pixels}, true742+ return AssetView(record), true
743 }743 }
744 744
745 // GetAsset is an alias for Asset.745 // GetAsset is an alias for Asset.
M protocol/kittygraphics/session.go +1 -4
@@ -135,10 +135,7 @@ func (s *Session) Finish() (Result, error) {
135135 }
136136 s.mu.Lock()
137137 defer s.mu.Unlock()
138- result := Result{}
139- for _, event := range s.parser.Finish() {
140- result.Events = append(result.Events, event)
141- }
138+ result := Result{Events: s.parser.Finish()}
142139 if len(result.Events) != 0 {
143140 return result, result.Events[0].Err
144141 }
@@ -135,10 +135,7 @@ func (s *Session) Finish() (Result, error) {
135 }135 }
136 s.mu.Lock()136 s.mu.Lock()
137 defer s.mu.Unlock()137 defer s.mu.Unlock()
138- result := Result{}138+ result := Result{Events: s.parser.Finish()}
139- for _, event := range s.parser.Finish() {
140- result.Events = append(result.Events, event)
141- }
142 if len(result.Events) != 0 {139 if len(result.Events) != 0 {
143 return result, result.Events[0].Err140 return result, result.Events[0].Err
144 }141 }
M screen.go +2 -2
@@ -408,7 +408,7 @@ func (s *Screen) dispatchKittyGraphics(apc []byte) {
408408 movementControls = *pending
409409 }
410410 if display && !continuation {
411- if !(controls.HasMore && controls.More == 1) {
411+ if !controls.HasMore || controls.More != 1 {
412412 if !controls.HasX {
413413 controls.X, controls.HasX = s.kittyCursorX(), true
414414 }
@@ -419,7 +419,7 @@ func (s *Screen) dispatchKittyGraphics(apc []byte) {
419419 }
420420 movementControls = controls
421421 }
422- if display && continuation && !(controls.HasMore && controls.More == 1) {
422+ if display && continuation && (!controls.HasMore || controls.More != 1) {
423423 s.graphics.kitty.SetPendingPlacement(s.kittyCursorX(), s.kittyCursorY())
424424 }
425425 if display && controls.HasMore && controls.More == 1 {
@@ -408,7 +408,7 @@ func (s *Screen) dispatchKittyGraphics(apc []byte) {
408 movementControls = *pending408 movementControls = *pending
409 }409 }
410 if display && !continuation {410 if display && !continuation {
411- if !(controls.HasMore && controls.More == 1) {411+ if !controls.HasMore || controls.More != 1 {
412 if !controls.HasX {412 if !controls.HasX {
413 controls.X, controls.HasX = s.kittyCursorX(), true413 controls.X, controls.HasX = s.kittyCursorX(), true
414 }414 }
@@ -419,7 +419,7 @@ func (s *Screen) dispatchKittyGraphics(apc []byte) {
419 }419 }
420 movementControls = controls420 movementControls = controls
421 }421 }
422- if display && continuation && !(controls.HasMore && controls.More == 1) {422+ if display && continuation && (!controls.HasMore || controls.More != 1) {
423 s.graphics.kitty.SetPendingPlacement(s.kittyCursorX(), s.kittyCursorY())423 s.graphics.kitty.SetPendingPlacement(s.kittyCursorX(), s.kittyCursorY())
424 }424 }
425 if display && controls.HasMore && controls.More == 1 {425 if display && controls.HasMore && controls.More == 1 {

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 2

Tags 13

↑↓ moveenter openesc close