xcvr tui

scroll down when at bottom

+16
+16
main.go
··· 396 396 if msg.Init.Echoed != nil && *msg.Init.Echoed { 397 397 m.myid = msg.Init.Id 398 398 } 399 + ab := m.vp.AtBottom() 399 400 m.vp.SetContent(JoinDeref(m.renders, "")) 401 + if ab { 402 + m.vp.GotoBottom() 403 + } 400 404 return m, nil 401 405 case *lrcpb.Event_Pub: 402 406 err := pubMessage(msg.Pub, m.msgs, m.width) ··· 414 418 m.error = &err 415 419 return m, nil 416 420 } 421 + ab := m.vp.AtBottom() 417 422 m.vp.SetContent(JoinDeref(m.renders, "")) 423 + if ab { 424 + m.vp.GotoBottom() 425 + } 418 426 return m, nil 419 427 case *lrcpb.Event_Delete: 420 428 err := deleteMessage(msg.Delete, m.msgs, &m.renders, m.width) ··· 423 431 m.error = &err 424 432 return m, nil 425 433 } 434 + ab := m.vp.AtBottom() 426 435 m.vp.SetContent(JoinDeref(m.renders, "")) 436 + if ab { 437 + m.vp.GotoBottom() 438 + } 427 439 return m, nil 428 440 case *lrcpb.Event_Mute: 429 441 return m, nil ··· 446 458 m.error = &err 447 459 return m, nil 448 460 } 461 + ab := m.vp.AtBottom() 449 462 m.vp.SetContent(JoinDeref(m.renders, "")) 463 + if ab { 464 + m.vp.GotoBottom() 465 + } 450 466 return m, nil 451 467 } 452 468 case tea.KeyMsg: