bensadeh / circumflex

🌿 It's Hacker News in your terminal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Panic when pressing `r` (reload) button twice

stefins opened this issue · comments

When I run circumflex as clx -a

I get panic when I press r button twice

panic: Unsupported c: 5

goroutine 44 [running]:
clx/hn/services/hybrid.getCategory(0x20?)
	/home/user/Projects/circumflex/hn/services/hybrid/hybrid.go:92 +0xc9
clx/hn/services/hybrid.fetchStoriesList(0x0?)
	/home/user/Projects/circumflex/hn/services/hybrid/hybrid.go:54 +0x4d
clx/hn/services/hybrid.(*Service).FetchItems(0x0?, 0x9, 0x0?)
	/home/user/Projects/circumflex/hn/services/hybrid/hybrid.go:28 +0x36
clx/bubble/list.Model.Update.func4()
	/home/user/Projects/circumflex/bubble/list/list.go:587 +0x9b
github.com/charmbracelet/bubbletea.(*Program).StartReturningModel.func6.1()
	/home/user/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.22.1/tea.go:469 +0x33
created by github.com/charmbracelet/bubbletea.(*Program).StartReturningModel.func6
	/home/user/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.22.1/tea.go:467 +0x14d

Platform

Linux 6.0.2-zen1-1-zen
go version go1.19.2 linux/amd64

Thank you for letting me know! This was easy to reproduce, hope to have a fix for this in 2.7.

Fixed in 68bf546. Thanks again for opening the ticket.