浏览代码

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

Jguer 5 年之前
父节点
当前提交
422a5931af
共有 1 个文件被更改,包括 3 次插入0 次删除
  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 {