bug(dig): crash when pressing ctrl+w
ezradiniz opened this issue · 0 comments
ezradiniz commented
How to reproduce?
- Open a json file
- Press
.
- Press
ctrl+w
Caught panic:
runtime error: slice bounds out of range [:-1]
Restoring terminal...
goroutine 1 [running]:
runtime/debug.Stack()
/usr/lib/go/src/runtime/debug/stack.go:24 +0x5e
runtime/debug.PrintStack()
/usr/lib/go/src/runtime/debug/stack.go:16 +0x13
github.com/charmbracelet/bubbletea.(*Program).Run.func1()
/home/ezra/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.24.2/tea.go:440 +0x91
panic({0x5907a0?, 0xc0002a2540?})
/usr/lib/go/src/runtime/panic.go:920 +0x270
main.(*model).handleDigKey(0xc00014e000, {0x17, {0x0, 0x0, 0x0}, 0x0})
/home/ezra/dev/fx/main.go:256 +0xd7c
main.(*model).Update(0xc000114420?, {0x58c260?, 0xc00007baa0?})
/home/ezra/dev/fx/main.go:210 +0x3cd
github.com/charmbracelet/bubbletea.(*Program).eventLoop(0xc0000000c0, {0x5ef678?, 0xc00014e000?}, 0xc00005cc00?)
/home/ezra/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.24.2/tea.go:373 +0x637
github.com/charmbracelet/bubbletea.(*Program).Run(0xc0000000c0)
/home/ezra/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.24.2/tea.go:503 +0x83c
main.main()
/home/ezra/dev/fx/main.go:143 +0x1138
Version: 30.1.0