detached 724608c

fix(core): use value-type motions in Monitor.settled after rebase on main

commit
724608c096514f7a73dfd5397e74859b9056887d
author
brice · · 2026-10-04 15:47 UTC
committer
brice · · 2026-10-04 19:08 UTC
parent
c0fdb38
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
2 files · +3 -3
M internal/core/pulse.go +2 -2
@@ -139,11 +139,11 @@ func (c *Core) advancePulse(now time.Time) float64 {
139139
140140 // settled reports whether no swipe or slide moves the monitor's layout.
141141 func (m *Monitor) settled() bool {
142- if m.switchMotion != nil || m.switchOff != 0 {
142+ if m.switchMotion.on || m.switchOff != 0 {
143143 return false
144144 }
145145 for w := range m.all() {
146- if w.motion != nil || w.shift != 0 {
146+ if w.motion.on || w.shift != 0 {
147147 return false
148148 }
149149 }
@@ -139,11 +139,11 @@ func (c *Core) advancePulse(now time.Time) float64 {
139 139
140 // settled reports whether no swipe or slide moves the monitor's layout.140 // settled reports whether no swipe or slide moves the monitor's layout.
141 func (m *Monitor) settled() bool {141 func (m *Monitor) settled() bool {
142- if m.switchMotion != nil || m.switchOff != 0 {142+ if m.switchMotion.on || m.switchOff != 0 {
143 return false143 return false
144 }144 }
145 for w := range m.all() {145 for w := range m.all() {
146- if w.motion != nil || w.shift != 0 {146+ if w.motion.on || w.shift != 0 {
147 return false147 return false
148 }148 }
149 }149 }
M internal/core/pulse_test.go +1 -1
@@ -193,7 +193,7 @@ func TestFocusPulseWaitsForSlide(t *testing.T) {
193193 slide func(*Monitor, time.Time)
194194 alone bool
195195 }{
196- {"workspace landing, alone", func(m *Monitor, now time.Time) { m.switchMotion = newMotion(workspaceSpring(0.5, 0), now) }, true},
196+ {"workspace landing, alone", func(m *Monitor, now time.Time) { m.switchMotion = newMotion(workspaceSpring(0.5, 0), now, 1) }, true},
197197 {"workspace drag, alone", func(m *Monitor, _ time.Time) { m.switchOff = 0.3 }, true},
198198 {"column drag, beside another", func(m *Monitor, _ time.Time) { m.Current().shift = 40 }, false},
199199 } {
@@ -193,7 +193,7 @@ func TestFocusPulseWaitsForSlide(t *testing.T) {
193 slide func(*Monitor, time.Time)193 slide func(*Monitor, time.Time)
194 alone bool194 alone bool
195 }{195 }{
196- {"workspace landing, alone", func(m *Monitor, now time.Time) { m.switchMotion = newMotion(workspaceSpring(0.5, 0), now) }, true},196+ {"workspace landing, alone", func(m *Monitor, now time.Time) { m.switchMotion = newMotion(workspaceSpring(0.5, 0), now, 1) }, true},
197 {"workspace drag, alone", func(m *Monitor, _ time.Time) { m.switchOff = 0.3 }, true},197 {"workspace drag, alone", func(m *Monitor, _ time.Time) { m.switchOff = 0.3 }, true},
198 {"column drag, beside another", func(m *Monitor, _ time.Time) { m.Current().shift = 40 }, false},198 {"column drag, beside another", func(m *Monitor, _ time.Time) { m.Current().shift = 40 }, false},
199 } {199 } {

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