From charnier@lirmm.fr  Wed May 24 02:30:10 1995
Received: from pcdif01.lirmm.fr ([193.49.106.70])
          by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id CAA06398
          for <FreeBSD-gnats-submit@freebsd.org>; Wed, 24 May 1995 02:27:42 -0700
Received: (root@localhost) by pcdif01.lirmm.fr (8.6.11/8.6.9) id LAA07097; Wed, 24 May 1995 11:23:27 +0200
Message-Id: <199505240923.LAA07097@pcdif01.lirmm.fr>
Date: Wed, 24 May 1995 11:23:27 +0200
From: Philippe CHARNIER <charnier@lirmm.fr>
Reply-To: charnier@lirmm.fr
To: FreeBSD-gnats-submit@freebsd.org
Subject: more does not call vi with +linenum when EDITOR=vi
X-Send-Pr-Version: 3.2

>Number:         441
>Category:       bin
>Synopsis:       more does not call vi with +linenum when EDITOR=vi
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 24 02:40:01 1995
>Closed-Date:    Wed Oct 4 02:34:05 PDT 1995
>Last-Modified:  Wed Oct  4 02:36:34 PDT 1995
>Originator:     Philippe CHARNIER
>Release:        FreeBSD 2.0.950412-SNAP i386
>Organization:
Philippe CHARNIER
>Environment:

	

>Description:

	The `v' command (more) does not use vi +linenum file
	request when EDITOR is already set to vi.
	

>How-To-Repeat:

	

>Fix:
	
	
Index: command.c
===================================================================
RCS file: /home2h/FreeBSD.cvsroot/src/usr.bin/more/command.c,v
retrieving revision 1.3
diff -u -r1.3 command.c
--- 1.3	1994/10/09 15:40:03
+++ command.c	1995/05/23 19:26:05
@@ -600,7 +600,8 @@
 	if (editor == NULL) {
 		editor = getenv("EDITOR");
 		/* pass the line number to vi */
-		if (editor == NULL || *editor == '\0') {
+		if (editor == NULL || *editor == '\0' ||
+		      !strcmp(editor, _PATH_VI) || !strcmp(editor,"vi")) {
 			editor = _PATH_VI;
 			dolinenumber = 1;
 		}

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: peter 
State-Changed-When: Wed Oct 4 02:34:05 PDT 1995 
State-Changed-Why:  
Fixed in usr.bin/more/command.c, rev 1.5 
An independently developed fix applied.. 
>Unformatted:


