summaryrefslogtreecommitdiffstats
path: root/usr.bin/sdiff/edit.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/sdiff/edit.c')
-rw-r--r--usr.bin/sdiff/edit.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/sdiff/edit.c b/usr.bin/sdiff/edit.c
index 16345da..21f7cdc 100644
--- a/usr.bin/sdiff/edit.c
+++ b/usr.bin/sdiff/edit.c
@@ -40,7 +40,10 @@ editit(const char *pathname)
int saved_errno, st, ret = -1;
const char *ed;
- if ((ed = getenv("EDITOR")) == NULL)
+ ed = getenv("VISUAL");
+ if (ed == NULL)
+ ed = getenv("EDITOR");
+ if (ed == NULL)
ed = _PATH_VI;
sighup = signal(SIGHUP, SIG_IGN);
OpenPOWER on IntegriCloud