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

Fixed a crash when scrolling through an empty list, which occurred wh… #53

Merged
merged 1 commit into from
Aug 10, 2024

Conversation

pjaudiomv
Copy link
Contributor

…en searches returned no results

9:01:02 › kxd
Kubeconfig Switcher
Search: twa█
Choose a config?

No results



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

goroutine 9 [running]:
github.com/radiusmethod/promptui/list.(*List).Index(...)
	/Users/pjoyce/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/radiusmethod/promptui@v0.10.0/list/list.go:204
github.com/radiusmethod/promptui.(*Select).innerRun.func1({0x81ced40, 0x0, 0x0}, 0xc0001a6d10?, 0x10)
	/Users/pjoyce/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/radiusmethod/promptui@v0.10.0/select.go:294 +0x132d
github.com/chzyer/readline.(*DumpListener).OnChange(0xc0001a6c80?, {0x81ced40?, 0x70e3cb7?, 0x2?}, 0xc000205f70?, 0x1?)
	/Users/pjoyce/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/chzyer/readline@v1.5.0/operation.go:516 +0x2b
github.com/chzyer/readline.(*Operation).ioloop(0xc0001e8070)
	/Users/pjoyce/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/chzyer/readline@v1.5.0/operation.go:339 +0x1ae5
created by github.com/chzyer/readline.NewOperation in goroutine 1
	/Users/pjoyce/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/chzyer/readline@v1.5.0/operation.go:88 +0x2c6

@pjaudiomv pjaudiomv merged commit c167014 into main Aug 10, 2024
1 check passed
@pjaudiomv pjaudiomv deleted the pj/fix-crash-list branch August 10, 2024 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants