Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete on empty input panics #159

Open
penberg opened this issue Oct 19, 2023 · 0 comments
Open

Autocomplete on empty input panics #159

penberg opened this issue Oct 19, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@penberg
Copy link
Contributor

penberg commented Oct 19, 2023

→  panic: runtime error: index out of range [-1]

goroutine 6 [running]:
github.com/libsql/libsql-shell-go/internal/suggester.SuggestCompletion({0x140000a0000?, 0x101b1ea40?})
	/Users/penberg/src/tursodatabase/libsql-shell-go/internal/suggester/suggester.go:14 +0x290
github.com/libsql/libsql-shell-go/internal/shell.(*shellAutoCompleter).Do(0x14000286170, {0x101b1ea40?, 0x1400007bc08?, 0x10122f76c?}, 0x0)
	/Users/penberg/src/tursodatabase/libsql-shell-go/internal/shell/shell.go:143 +0x4c
github.com/chzyer/readline.(*opCompleter).OnComplete(0x140002bab60)
	/Users/penberg/go/pkg/mod/github.com/chzyer/readline@v1.5.1/complete.go:87 +0x128
github.com/chzyer/readline.(*Operation).ioloop(0x140002baa80)
	/Users/penberg/go/pkg/mod/github.com/chzyer/readline@v1.5.1/operation.go:180 +0xa3c
created by github.com/chzyer/readline.NewOperation in goroutine 1
	/Users/penberg/go/pkg/mod/github.com/chzyer/readline@v1.5.1/operation.go:88 +0x2d4
exit status 2
@penberg penberg added the bug Something isn't working label Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant