change `strings.Index` for `strings.Contains`

This commit is contained in:
bartfokker 2018-10-25 22:14:00 +02:00
parent efef345665
commit db3d7e8927
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ func (i *Input) KeyPress(e ui.Event) {
if len(i.Data) >= i.MaxLen {
return
}
if strings.Index(input_chars, ch) > -1 {
if strings.Contains(input_chars, ch) {
i.Data += ch
i.stream <- i.Data
ui.Render(i)