repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
6203700
parent
01eb7a1
author
Eric Bower
date
2024-10-06 03:21:05 +0000 UTC
fix(pico): cap log lines to 1k
1 files changed,  +4, -0
M tui/logs/logs.go
+4, -0
 1@@ -84,6 +84,10 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
 2 		m.viewport.Height = msg.Height - hh - inputHeight
 3 	case logLineLoadedMsg:
 4 		m.logData = append(m.logData, msg)
 5+		lng := len(m.logData)
 6+		if lng > 1000 {
 7+			m.logData = m.logData[lng-1000:]
 8+		}
 9 		wasAt := false
10 		if m.viewport.AtBottom() {
11 			wasAt = true