Assist: reset view to top after refreshing window content

Add w.Addr("0")/dot=addr/show after content writes in refreshList,
refreshMailboxWindow, refreshDaemonWindow, and refreshViewBeadWindow
so windows no longer scroll to the bottom on open or refresh.

Closes anv-hww

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Levi Neely 2026-03-02 18:42:07 +01:00
parent 090b92bb0a
commit 33026360b3
1 changed files with 18 additions and 0 deletions

View File

@ -600,6 +600,9 @@ func refreshList(w *acme.Win) {
w.Addr(",")
w.Write("data", []byte(buf.String()))
w.Ctl("clean")
w.Addr("0")
w.Ctl("dot=addr")
w.Ctl("show")
return
}
@ -610,6 +613,9 @@ func refreshList(w *acme.Win) {
w.Addr(",")
w.Write("data", []byte(buf.String()))
w.Ctl("clean")
w.Addr("0")
w.Ctl("dot=addr")
w.Ctl("show")
return
}
@ -627,6 +633,9 @@ func refreshList(w *acme.Win) {
w.Addr(",")
w.Write("data", []byte(buf.String()))
w.Ctl("clean")
w.Addr("0")
w.Ctl("dot=addr")
w.Ctl("show")
}
// sessionEdit represents a single inline action parsed from the sessions window body.
@ -1041,6 +1050,9 @@ func refreshDaemonWindow(w *acme.Win) {
w.Addr(",")
w.Write("data", []byte(buf.String()))
w.Ctl("clean")
w.Addr("0")
w.Ctl("dot=addr")
w.Ctl("show")
}
func startDaemon(w *acme.Win) {
@ -1208,6 +1220,9 @@ func refreshMailboxWindow(w *acme.Win, folder, title string) {
w.Addr(",")
w.Write("data", []byte(buf.String()))
w.Ctl("clean")
w.Addr("0")
w.Ctl("dot=addr")
w.Ctl("show")
}
func shortUUID(id string) string {
@ -2390,6 +2405,9 @@ func refreshViewBeadWindow(w *acme.Win, beadID string, mount string) {
w.Addr(",")
w.Write("data", []byte(buf.String()))
w.Ctl("clean")
w.Addr("0")
w.Ctl("dot=addr")
w.Ctl("show")
}
func getBead(beadID string, mount string) (*Bead, error) {