If select NONE theme, will get error.
WingLim opened this issue · comments
WingLim commented
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!)
- foo
- bar
- baz