Explorar o código

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

Jguer %!s(int64=5) %!d(string=hai) anos
pai
achega
422a5931af
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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 {