mirror of
https://github.com/Jguer/yay
synced 2024-07-21 10:16:10 +00:00
Prefer VISUAL over EDITOR for editmenu
This commit is contained in:
parent
9ebc98e80f
commit
7e8d61c017
|
@ -30,8 +30,8 @@ func editor(editorConfig, editorFlags string, noConfirm bool) (editor string, ar
|
|||
}
|
||||
|
||||
fallthrough
|
||||
case os.Getenv("EDITOR") != "":
|
||||
if editorArgs := strings.Fields(os.Getenv("EDITOR")); len(editorArgs) != 0 {
|
||||
case os.Getenv("VISUAL") != "":
|
||||
if editorArgs := strings.Fields(os.Getenv("VISUAL")); len(editorArgs) != 0 {
|
||||
editor, err := exec.LookPath(editorArgs[0])
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
|
@ -41,8 +41,8 @@ func editor(editorConfig, editorFlags string, noConfirm bool) (editor string, ar
|
|||
}
|
||||
|
||||
fallthrough
|
||||
case os.Getenv("VISUAL") != "":
|
||||
if editorArgs := strings.Fields(os.Getenv("VISUAL")); len(editorArgs) != 0 {
|
||||
case os.Getenv("EDITOR") != "":
|
||||
if editorArgs := strings.Fields(os.Getenv("EDITOR")); len(editorArgs) != 0 {
|
||||
editor, err := exec.LookPath(editorArgs[0])
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
|
|
Loading…
Reference in a new issue