tangled
alpha
login
or
join now
moth11.net
/
ttyxcvr
0
fork
atom
xcvr tui
0
fork
atom
overview
issues
pulls
pipelines
scroll down when at bottom
moth11.net
5 months ago
80ac5884
7254ae5a
+16
1 changed file
expand all
collapse all
unified
split
main.go
+16
main.go
···
396
396
if msg.Init.Echoed != nil && *msg.Init.Echoed {
397
397
m.myid = msg.Init.Id
398
398
}
399
399
+
ab := m.vp.AtBottom()
399
400
m.vp.SetContent(JoinDeref(m.renders, ""))
401
401
+
if ab {
402
402
+
m.vp.GotoBottom()
403
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
421
+
ab := m.vp.AtBottom()
417
422
m.vp.SetContent(JoinDeref(m.renders, ""))
423
423
+
if ab {
424
424
+
m.vp.GotoBottom()
425
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
434
+
ab := m.vp.AtBottom()
426
435
m.vp.SetContent(JoinDeref(m.renders, ""))
436
436
+
if ab {
437
437
+
m.vp.GotoBottom()
438
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
461
+
ab := m.vp.AtBottom()
449
462
m.vp.SetContent(JoinDeref(m.renders, ""))
463
463
+
if ab {
464
464
+
m.vp.GotoBottom()
465
465
+
}
450
466
return m, nil
451
467
}
452
468
case tea.KeyMsg: