br0xen/boltbrowser

panic in jump down (ctrl+f)

aerth opened this issue · 0 comments

aerth commented

here is the panic

panic: runtime error: index out of range [1] with length 1

goroutine 1 [running]:
main.(*BrowserScreen).jumpCursorDown(0xc000244000, 0x1, 0x1)
        /home/builder/boltbrowser/screen_browser.go:467 +0x35d
main.(*BrowserScreen).handleBrowseKeyEvent(0xc000244000, 0x60000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xc00003dca0)
        /home/builder/boltbrowser/screen_browser.go:121 +0x73d
main.(*BrowserScreen).handleKeyEvent(0xc000244000, 0x60000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0)
        /home/builder/boltbrowser/screen_browser.go:84 +0x1fa
main.mainLoop(0xc00000c060, 0x3000100080001, 0x30001)
        /home/builder/boltbrowser/mainloop.go:25 +0x21e
main.main()
        /home/builder/boltbrowser/main.go:141 +0x333

reproduced (with same database) over ssh and locally with both kitty and xfce4-terminal

linux, TERM=xterm-256color
latest master branch (commit 7f10a81cece0f6754d1902b69c03892f267f65ee)

i will try and come up with a patch, but using / in the meantime