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

This commit is contained in:
Jguer committed 2019-10-13 00:48:12 +01:00
1 parent f1a6c4afdc
commit 422a5931af
1 file changed
+3
+3
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 {