tuido icon indicating copy to clipboard operation
tuido copied to clipboard

Slice Range error on "empty" markdown item

Open NiloCK opened this issue 1 year ago • 0 comments

Caught panic:

runtime error: slice bounds out of range [4:3]

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
        /opt/hostedtoolcache/go/1.18.10/x64/src/runtime/debug/stack.go:24 +0x65
runtime/debug.PrintStack()
        /opt/hostedtoolcache/go/1.18.10/x64/src/runtime/debug/stack.go:16 +0x19
github.com/charmbracelet/bubbletea.(*Program).StartReturningModel.func3()
        /home/runner/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:359 +0x95
panic({0x7bfd40, 0xc000206a50})
        /opt/hostedtoolcache/go/1.18.10/x64/src/runtime/panic.go:844 +0x258
github.com/nilock/tuido/tuido.(*Item).GetContext(0xc0005b0368, 0x1c)
        /home/runner/work/tuido/tuido/tuido/tuido.go:208 +0x649
github.com/nilock/tuido/tui.(*peekScreen).View(0xc0005b0368, 0x1e, 0x3?, 0xc000206d38?)
        /home/runner/work/tuido/tuido/tui/peek.go:21 +0x85
github.com/nilock/tuido/tui.tui.View({{{0xc60240, 0x3, 0x3}, {0xc000206d38, 0x12}}, {0x0, 0x0}, {0xc0003d26e0, 0x1, 0x1}, ...})
        /home/runner/work/tuido/tuido/tui/view.go:165 +0xc7d
github.com/charmbracelet/bubbletea.(*Program).StartReturningModel(0xc00011a080)
        /home/runner/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:549 +0x1398
github.com/charmbracelet/bubbletea.(*Program).Start(...)
        /home/runner/go/pkg/mod/github.com/charmbracelet/[email protected]/tea.go:556
github.com/nilock/tuido/tui.Run()
        /home/runner/work/tuido/tuido/tui/tui.go:68 +0x4ae
main.main()
        /home/runner/work/tuido/tuido/main.go:8 +0x17

when attempting to preview item:

> [ ]

from file:



- [ ]

NiloCK avatar Apr 03 '24 12:04 NiloCK