summaryrefslogtreecommitdiffstats
path: root/usr.bin/more
diff options
context:
space:
mode:
authormpp <mpp@FreeBSD.org>1995-10-05 22:26:43 +0000
committermpp <mpp@FreeBSD.org>1995-10-05 22:26:43 +0000
commit4eb877ffe481a85a067d6f4681b865ea277600b1 (patch)
treeb8aa881828479952098d4bae2fa16c74257d2e33 /usr.bin/more
parent2734551417f3e16093c4cc8de51248dd743fa17b (diff)
downloadFreeBSD-src-4eb877ffe481a85a067d6f4681b865ea277600b1.zip
FreeBSD-src-4eb877ffe481a85a067d6f4681b865ea277600b1.tar.gz
Fix a bug in a recent commit that broke more so that it
would no longer properly detect when "vi" was being called, and thus would not call vi with the "+line#" argument.
Diffstat (limited to 'usr.bin/more')
-rw-r--r--usr.bin/more/command.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.bin/more/command.c b/usr.bin/more/command.c
index b26fa22..f451604 100644
--- a/usr.bin/more/command.c
+++ b/usr.bin/more/command.c
@@ -610,6 +610,8 @@ editfile()
base = strrchr(editor, '/');
if (!base)
base = editor;
+ else
+ base++;
/* emacs also accepts vi-style +nnnn */
if (strcmp(base, "vi") == 0 || strcmp(base, "emacs") == 0)
OpenPOWER on IntegriCloud