Browse Source

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

Jguer 5 years ago
parent
commit
422a5931af
1 changed files with 3 additions and 0 deletions
  1. 3 0
      config.go

+ 3 - 0
config.go

@@ -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 {