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

If select NONE theme, will get error. #129

Open
WingLim opened this issue Nov 16, 2020 · 0 comments
Open

If select NONE theme, will get error. #129

WingLim opened this issue Nov 16, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@WingLim
Copy link
Contributor

WingLim commented Nov 16, 2020

Problems summary

In bin/generator, there is a problem.
User can select no theme, then will return an error like this:

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

goroutine 1 [running]:
main.GetColorScheme(0x6f6e80, 0x0, 0x0, 0x1a4, 0xc00018c108)
        /Users/stephen/.config/nvim/cmd/main.go:134 +0x422
main.colorscheme(0xc0000b4060, 0x26)
        /Users/stephen/.config/nvim/cmd/main.go:122 +0x4a1
main.main()
        /Users/stephen/.config/nvim/cmd/main.go:21 +0x8b

Maybe you should add a default option in survey.MultiSelect or add some code to handle it if user selcet nothing.

Environment Information

  • OS: Ubuntu 20.04

  • thinkvim :echo g:thinkvim_version output: 2.6.5

  • neovim :version output: 0.4.3

  • :checkhealth or :CheckHealth result(neovim only):

How to reproduce the problem from neovim startup (Required!)

  1. foo
  2. bar
  3. baz

Screenshot (if possible)

@WingLim WingLim added the bug Something isn't working label Nov 16, 2020
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