detached 646a86d

fix(overview): bound dividers for empty workspace previews

commit
646a86d6fc58b515fc3ec3b2019896acaed829b3
author
brice · · 2026-10-06 14:36 UTC
parent
50086d1
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
1 file · +5 -2
M internal/core/overview.go +5 -2
@@ -637,8 +637,7 @@ func (m *Monitor) overviewDividers(layout []Placement) []ports.Separator {
637637 bounds := func(w *Workspace) (int, int) {
638638 lo, hi := int(^uint(0)>>1), -int(^uint(0)>>1)
639639 for _, p := range layout {
640- owner, _ := m.find(p.ID)
641- if owner == w && !p.Hidden {
640+ if w.has(p.ID) && !p.Hidden {
642641 lo = min(lo, p.Rect.X)
643642 hi = max(hi, p.Rect.X+p.Rect.W)
644643 }
@@ -647,6 +646,10 @@ func (m *Monitor) overviewDividers(layout []Placement) []ports.Separator {
647646 }
648647 left, right := bounds(cur)
649648 u := cur.overviewArea()
649+ if left > right {
650+ left = u.X + u.W/2
651+ right = left
652+ }
650653 var lines []ports.Separator
651654 for _, i := range []int{at - 1, at + 1} {
652655 if i < 0 || i >= len(list) || m.isHidden(list[i]) == m.isHidden(cur) {
@@ -637,8 +637,7 @@ func (m *Monitor) overviewDividers(layout []Placement) []ports.Separator {
637 bounds := func(w *Workspace) (int, int) {637 bounds := func(w *Workspace) (int, int) {
638 lo, hi := int(^uint(0)>>1), -int(^uint(0)>>1)638 lo, hi := int(^uint(0)>>1), -int(^uint(0)>>1)
639 for _, p := range layout {639 for _, p := range layout {
640- owner, _ := m.find(p.ID)640+ if w.has(p.ID) && !p.Hidden {
641- if owner == w && !p.Hidden {
642 lo = min(lo, p.Rect.X)641 lo = min(lo, p.Rect.X)
643 hi = max(hi, p.Rect.X+p.Rect.W)642 hi = max(hi, p.Rect.X+p.Rect.W)
644 }643 }
@@ -647,6 +646,10 @@ func (m *Monitor) overviewDividers(layout []Placement) []ports.Separator {
647 }646 }
648 left, right := bounds(cur)647 left, right := bounds(cur)
649 u := cur.overviewArea()648 u := cur.overviewArea()
649+ if left > right {
650+ left = u.X + u.W/2
651+ right = left
652+ }
650 var lines []ports.Separator653 var lines []ports.Separator
651 for _, i := range []int{at - 1, at + 1} {654 for _, i := range []int{at - 1, at + 1} {
652 if i < 0 || i >= len(list) || m.isHidden(list[i]) == m.isHidden(cur) {655 if i < 0 || i >= len(list) || m.isHidden(list[i]) == m.isHidden(cur) {

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