From ad61211babd3ebf16a5b46129d26ca4051f0d0bd Mon Sep 17 00:00:00 2001 From: Michael Kaiser Date: Tue, 17 Oct 2017 12:28:59 +0200 Subject: [PATCH] Fix recognition logic for vi editor variants again --- github/editor.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/github/editor.go b/github/editor.go index b9df70e64..49251fed6 100644 --- a/github/editor.go +++ b/github/editor.go @@ -111,8 +111,8 @@ func (e *Editor) readContent() (content []byte, err error) { func openTextEditor(program, file string) error { editCmd := cmd.New(program) - r := regexp.MustCompile(`\b(?:[gm]?vim|vi)\b`) - if r.MatchString(program) { + r := regexp.MustCompile(`\b(?:[gm]?vim|vi)(?:\.exe)?$`) + if r.MatchString(editCmd.Name) { editCmd.WithArg("--cmd") editCmd.WithArg("set ft=gitcommit tw=0 wrap lbr") }