Check fields length to avoid panic in editor prompt. Fixes #834

This commit is contained in:
Jguer 2019-10-13 00:48:12 +01:00
parent f1a6c4afdc
commit 422a5931af
No known key found for this signature in database
GPG key ID: 6D6CC9BEA8556B35

View file

@ -255,6 +255,9 @@ func editor() (string, []string) {
}
editorArgs := strings.Fields(editorInput)
if len(editorArgs) == 0 {
continue
}
editor, err := exec.LookPath(editorArgs[0])
if err != nil {