detached f2fc42d

fix(core): clear foreign span stamps on columns added by addColumn

commit
f2fc42d21ab3284f0152ce7e5a2daf489d888f8b
author
brice · · 2026-10-21 05:49 UTC
committer
brice · · 2026-10-21 07:11 UTC
parent
f020f70
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
checks
1/1
2 files · +17 -0
M internal/core/layout.go +2 -0
@@ -548,6 +548,8 @@ func (w *Workspace) addWindow(id WindowID, cells int) {
548548 // addColumn places a new column like a new window and focuses it.
549549 func (w *Workspace) addColumn(col Column) {
550550 at := 0
551+ // Stamp identities belong to the issuing workspace and complete lane.
552+ col.Span, col.spanStamp = 0, 0
551553 col.BandStart = false
552554 if w.policy().wraps {
553555 // After the focused band: it joins it when it has room, else it
@@ -548,6 +548,8 @@ func (w *Workspace) addWindow(id WindowID, cells int) {
548 // addColumn places a new column like a new window and focuses it.548 // addColumn places a new column like a new window and focuses it.
549 func (w *Workspace) addColumn(col Column) {549 func (w *Workspace) addColumn(col Column) {
550 at := 0550 at := 0
551+ // Stamp identities belong to the issuing workspace and complete lane.
552+ col.Span, col.spanStamp = 0, 0
551 col.BandStart = false553 col.BandStart = false
552 if w.policy().wraps {554 if w.policy().wraps {
553 // After the focused band: it joins it when it has room, else it555 // After the focused band: it joins it when it has room, else it
M internal/core/spans_test.go +15 -0
@@ -186,3 +186,18 @@ func TestSpanLaneIdentity(t *testing.T) {
186186 })
187187 }
188188 }
189+
190+// A column arriving from another workspace carries that workspace's stamp,
191+// which may collide with a stamp issued here.
192+func TestSpansForeignStampCleared(t *testing.T) {
193+ w := spanWorkspace(OverflowScroll, 2)
194+ stampSpans(w, 0, 1)
195+ stamp := w.spanSeq
196+ w.receive(Column{Windows: []WindowID{9}, Span: 3000, spanStamp: stamp}, -1)
197+ w.dropStaleSpans()
198+ for _, col := range w.Columns {
199+ if col.Span != 0 || col.spanStamp != 0 {
200+ t.Fatal("foreign stamp joined the lane", w.Columns)
201+ }
202+ }
203+}
@@ -186,3 +186,18 @@ func TestSpanLaneIdentity(t *testing.T) {
186 })186 })
187 }187 }
188 }188 }
189+
190+// A column arriving from another workspace carries that workspace's stamp,
191+// which may collide with a stamp issued here.
192+func TestSpansForeignStampCleared(t *testing.T) {
193+ w := spanWorkspace(OverflowScroll, 2)
194+ stampSpans(w, 0, 1)
195+ stamp := w.spanSeq
196+ w.receive(Column{Windows: []WindowID{9}, Span: 3000, spanStamp: stamp}, -1)
197+ w.dropStaleSpans()
198+ for _, col := range w.Columns {
199+ if col.Span != 0 || col.spanStamp != 0 {
200+ t.Fatal("foreign stamp joined the lane", w.Columns)
201+ }
202+ }
203+}

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 24

Tags 10

↑↓ moveenter openesc close