From nobody@FreeBSD.org  Wed Apr 21 17:21:19 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F06261065679
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 21 Apr 2010 17:21:19 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id DFC5B8FC1E
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 21 Apr 2010 17:21:19 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o3LHLJM4017845
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 21 Apr 2010 17:21:19 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o3LHLJdJ017844;
	Wed, 21 Apr 2010 17:21:19 GMT
	(envelope-from nobody)
Message-Id: <201004211721.o3LHLJdJ017844@www.freebsd.org>
Date: Wed, 21 Apr 2010 17:21:19 GMT
From: Alexander Best <alexbestms@wwu.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: the line calculation in ee(1) doesn't get reinitialised upon line deletion
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         145921
>Category:       bin
>Synopsis:       the line calculation in ee(1) doesn't get reinitialised upon line deletion
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ed
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 21 17:30:02 UTC 2010
>Closed-Date:    Sun Oct 24 18:16:29 UTC 2010
>Last-Modified:  Sun Oct 24 18:20:09 UTC 2010
>Originator:     Alexander Best
>Release:        9.0-CURRENT
>Organization:
>Environment:
FreeBSD otaku 9.0-CURRENT FreeBSD 9.0-CURRENT #1 r206813: Wed Apr 21 18:01:52 CEST 2010     root@otaku:/usr/obj/usr/local/src/clangbsd/sys/ARUNDEL  amd64
>Description:
when deleting a line ee(1) seems to misses to adjust some attributes to correspond with the changed amount of lines. this leads to various problems. please see the report section for an example which triggers the problem.
>How-To-Repeat:
1) start `ee`

2) enter the following: "A%enter%B%enter%C"

3) navigate to the first line and hit "ctrl+k"

4) navigate to line 2 and observe ee mistaking line 2 for line 3

5) now hit the delete key twice and see "top" changing to -1

6) hit the delete key again and see how the cursor jumps right into the middle of the window
>Fix:


>Release-Note:
>Audit-Trail:

From: Alexander Best <alexbestms@uni-muenster.de>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/145921: the line calculation in ee(1) doesn't get 
	reinitialised upon line deletion
Date: Thu, 27 May 2010 17:23:34 +0200

 i've mailed Hugh Mahon about the problem and he's working on a fix.
 it'll probably be fixed in the next vendor release.
 
 cheers.
 
 -- 
 Alexander Best

From: Alexander Best <alexbestms@uni-muenster.de>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/145921: the line calculation in ee(1) doesn't get 
	reinitialised upon line deletion
Date: Fri, 4 Jun 2010 19:00:36 +0200

 this issue has been fixed by hugh in easyedit 1.5.2. the sources can
 be found here: http://mahon.cwx.net/sources/ee-1.5.2.src.tgz
 
 i've mailed ed@ regarding the vendor import. maybe this pr should be
 set into analysed state.
 
 cheers.
 
 -- 
 Alexander Best
State-Changed-From-To: open->suspended 
State-Changed-By: linimon 
State-Changed-When: Fri Jun 4 19:04:51 UTC 2010 
State-Changed-Why:  
Fixed in upstream code, awaiting next import. 


Responsible-Changed-From-To: freebsd-bugs->ed 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Jun 4 19:04:51 UTC 2010 
Responsible-Changed-Why:  
By suggestion, assign to person who did last import. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=145921 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/145921: commit references a PR
Date: Fri,  8 Oct 2010 09:43:13 +0000 (UTC)

 Author: ed
 Date: Fri Oct  8 09:43:06 2010
 New Revision: 213567
 URL: http://svn.freebsd.org/changeset/base/213567
 
 Log:
   Import ee 1.5.2 into HEAD.
   
   PR:		bin/145921
   MFC after:	2 weeks
 
 Modified:
   head/contrib/ee/ee.c
   head/contrib/ee/ee_version.h
 Directory Properties:
   head/contrib/ee/   (props changed)
 
 Modified: head/contrib/ee/ee.c
 ==============================================================================
 --- head/contrib/ee/ee.c	Fri Oct  8 09:35:23 2010	(r213566)
 +++ head/contrib/ee/ee.c	Fri Oct  8 09:43:06 2010	(r213567)
 @@ -50,7 +50,7 @@
   |	proprietary information which is protected by
   |	copyright.  All rights are reserved.
   |
 - |	$Header: /home/hugh/sources/old_ae/RCS/ee.c,v 1.102 2009/02/17 03:22:50 hugh Exp hugh $
 + |	$Header: /home/hugh/sources/old_ae/RCS/ee.c,v 1.104 2010/06/04 01:55:31 hugh Exp hugh $
   |
   */
  
 @@ -62,7 +62,7 @@ char *ee_copyright_message = 
  
  #include "ee_version.h"
  
 -char *version = "@(#) ee, version "  EE_VERSION  " $Revision: 1.102 $";
 +char *version = "@(#) ee, version "  EE_VERSION  " $Revision: 1.104 $";
  
  #ifdef NCURSE
  #include "new_curse.h"
 @@ -307,7 +307,7 @@ void undel_word P_((void));
  void del_line P_((void));
  void undel_line P_((void));
  void adv_word P_((void));
 -void move_rel P_((char *direction, int lines));
 +void move_rel P_((char direction, int lines));
  void eol P_((void));
  void bol P_((void));
  void adv_line P_((void));
 @@ -816,7 +816,7 @@ int disp;
  			tp++;
  			temp2++;
  		}
 -		if (scr_horz < horiz_offset)
 +		if ((scr_horz < horiz_offset) && (horiz_offset > 0))
  		{
  			horiz_offset -= 8;
  			midscreen(scr_vert, point);
 @@ -824,7 +824,6 @@ int disp;
  	}
  	else if (curr_line->prev_line != NULL)
  	{
 -		absolute_lin--;
  		text_changes = TRUE;
  		left(disp);			/* go to previous line	*/
  		temp_buff = curr_line->next_line;
 @@ -1220,11 +1219,11 @@ control()			/* use control for commands	
  	else if (in == 13)	/* control m	*/
  		insert_line(TRUE);
  	else if (in == 14)	/* control n	*/
 -		move_rel("d", max(5, (last_line - 5)));
 +		move_rel('d', max(5, (last_line - 5)));
  	else if (in == 15)	/* control o	*/
  		eol();
  	else if (in == 16)	/* control p	*/
 -		move_rel("u", max(5, (last_line - 5)));
 +		move_rel('u', max(5, (last_line - 5)));
  	else if (in == 17)	/* control q	*/
  		;
  	else if (in == 18)	/* control r	*/
 @@ -1275,7 +1274,7 @@ emacs_control()
  	else if (in == 6)	/* control f	*/
  		right(TRUE);
  	else if (in == 7)	/* control g	*/
 -		move_rel("u", max(5, (last_line - 5)));
 +		move_rel('u', max(5, (last_line - 5)));
  	else if (in == 8)	/* control h	*/
  		delete(TRUE);
  	else if (in == 9)	/* control i	*/
 @@ -1314,7 +1313,7 @@ emacs_control()
  	else if (in == 21)	/* control u	*/
  		bottom();
  	else if (in == 22)	/* control v	*/
 -		move_rel("d", max(5, (last_line - 5)));
 +		move_rel('d', max(5, (last_line - 5)));
  	else if (in == 23)	/* control w	*/
  		del_word();
  	else if (in == 24)	/* control x	*/
 @@ -1549,9 +1548,9 @@ function_key()				/* process function ke
  	else if (in == KEY_DOWN)
  		down();
  	else if (in == KEY_NPAGE)
 -		move_rel("d", max( 5, (last_line - 5)));
 +		move_rel('d', max( 5, (last_line - 5)));
  	else if (in == KEY_PPAGE)
 -		move_rel("u", max(5, (last_line - 5)));
 +		move_rel('u', max(5, (last_line - 5)));
  	else if (in == KEY_DL)
  		del_line();
  	else if (in == KEY_DC)
 @@ -1989,7 +1988,7 @@ char *cmd_str;
  	int number;
  	int i;
  	char *ptr;
 -	char *direction = "d";
 +	char direction = '\0';
  	struct text *t_line;
  
  	ptr = cmd_str;
 @@ -2006,12 +2005,12 @@ char *cmd_str;
  	{
  		i++;
  		t_line = t_line->prev_line;
 -		direction = "u";
 +		direction = 'u';
  	}
  	while ((t_line->line_number < number) && (t_line->next_line != NULL))
  	{
  		i++;
 -		direction = "d";
 +		direction = 'd';
  		t_line = t_line->next_line;
  	}
  	if ((i < 30) && (i > 0))
 @@ -2020,7 +2019,7 @@ char *cmd_str;
  	}
  	else
  	{
 -		if (!strcmp(direction, "d"))
 +		if (direction != 'd')
  		{
  			absolute_lin += i;
  		}
 @@ -2217,7 +2216,7 @@ check_fp()		/* open or close files accor
  		if (start_at_line != NULL)
  		{
  			line_num = atoi(start_at_line) - 1;
 -			move_rel("d", line_num);
 +			move_rel('d', line_num);
  			line_num = 0;
  			start_at_line = NULL;
  		}
 @@ -2660,7 +2659,7 @@ int display_message;
  		{
  			if (lines_moved < 30)
  			{
 -				move_rel("d", lines_moved);
 +				move_rel('d', lines_moved);
  				while (position < iter)
  					right(TRUE);
  			}
 @@ -2730,8 +2729,8 @@ del_char()			/* delete current character
  	}
  	else
  	{
 -		right(FALSE);
 -		delete(FALSE);
 +		right(TRUE);
 +		delete(TRUE);
  	}
  }
  
 @@ -2940,13 +2939,13 @@ while ((position < curr_line->line_lengt
  
  void 
  move_rel(direction, lines)	/* move relative to current line	*/
 -char *direction;
 +char direction;
  int lines;
  {
  	int i;
  	char *tmp;
  
 -	if (*direction == 'u')
 +	if (direction == 'u')
  	{
  		scr_pos = 0;
  		while (position > 1)
 
 Modified: head/contrib/ee/ee_version.h
 ==============================================================================
 --- head/contrib/ee/ee_version.h	Fri Oct  8 09:35:23 2010	(r213566)
 +++ head/contrib/ee/ee_version.h	Fri Oct  8 09:43:06 2010	(r213567)
 @@ -2,5 +2,5 @@
   |	provide a version number for ee
   */
  
 -#define EE_VERSION "1.5.0"
 -#define DATE_STRING "$Date: 2009/02/17 03:32:30 $"
 +#define EE_VERSION "1.5.2"
 +#define DATE_STRING "$Date: 2010/06/04 02:35:35 $"
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: suspended->patched 
State-Changed-By: arundel 
State-Changed-When: Fri Oct 8 11:35:12 UTC 2010 
State-Changed-Why:  
Patched in HEAD by ee 1.5.2 vendor import (r213567). 
Thanks Ed. :) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=145921 
State-Changed-From-To: patched->closed 
State-Changed-By: ed 
State-Changed-When: Sun Oct 24 18:16:28 UTC 2010 
State-Changed-Why:  
Backported to 8-STABLE. Have fun! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=145921 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/145921: commit references a PR
Date: Sun, 24 Oct 2010 18:12:20 +0000 (UTC)

 Author: ed
 Date: Sun Oct 24 18:12:11 2010
 New Revision: 214287
 URL: http://svn.freebsd.org/changeset/base/214287
 
 Log:
   MFC r213567:
   
     Import ee 1.5.2 into HEAD.
   
   PR:	bin/145921
 
 Modified:
   stable/8/contrib/ee/ee.c
   stable/8/contrib/ee/ee_version.h
 Directory Properties:
   stable/8/contrib/ee/   (props changed)
 
 Modified: stable/8/contrib/ee/ee.c
 ==============================================================================
 --- stable/8/contrib/ee/ee.c	Sun Oct 24 17:42:41 2010	(r214286)
 +++ stable/8/contrib/ee/ee.c	Sun Oct 24 18:12:11 2010	(r214287)
 @@ -50,7 +50,7 @@
   |	proprietary information which is protected by
   |	copyright.  All rights are reserved.
   |
 - |	$Header: /home/hugh/sources/old_ae/RCS/ee.c,v 1.102 2009/02/17 03:22:50 hugh Exp hugh $
 + |	$Header: /home/hugh/sources/old_ae/RCS/ee.c,v 1.104 2010/06/04 01:55:31 hugh Exp hugh $
   |
   */
  
 @@ -62,7 +62,7 @@ char *ee_copyright_message = 
  
  #include "ee_version.h"
  
 -char *version = "@(#) ee, version "  EE_VERSION  " $Revision: 1.102 $";
 +char *version = "@(#) ee, version "  EE_VERSION  " $Revision: 1.104 $";
  
  #ifdef NCURSE
  #include "new_curse.h"
 @@ -307,7 +307,7 @@ void undel_word P_((void));
  void del_line P_((void));
  void undel_line P_((void));
  void adv_word P_((void));
 -void move_rel P_((char *direction, int lines));
 +void move_rel P_((char direction, int lines));
  void eol P_((void));
  void bol P_((void));
  void adv_line P_((void));
 @@ -816,7 +816,7 @@ int disp;
  			tp++;
  			temp2++;
  		}
 -		if (scr_horz < horiz_offset)
 +		if ((scr_horz < horiz_offset) && (horiz_offset > 0))
  		{
  			horiz_offset -= 8;
  			midscreen(scr_vert, point);
 @@ -824,7 +824,6 @@ int disp;
  	}
  	else if (curr_line->prev_line != NULL)
  	{
 -		absolute_lin--;
  		text_changes = TRUE;
  		left(disp);			/* go to previous line	*/
  		temp_buff = curr_line->next_line;
 @@ -1220,11 +1219,11 @@ control()			/* use control for commands	
  	else if (in == 13)	/* control m	*/
  		insert_line(TRUE);
  	else if (in == 14)	/* control n	*/
 -		move_rel("d", max(5, (last_line - 5)));
 +		move_rel('d', max(5, (last_line - 5)));
  	else if (in == 15)	/* control o	*/
  		eol();
  	else if (in == 16)	/* control p	*/
 -		move_rel("u", max(5, (last_line - 5)));
 +		move_rel('u', max(5, (last_line - 5)));
  	else if (in == 17)	/* control q	*/
  		;
  	else if (in == 18)	/* control r	*/
 @@ -1275,7 +1274,7 @@ emacs_control()
  	else if (in == 6)	/* control f	*/
  		right(TRUE);
  	else if (in == 7)	/* control g	*/
 -		move_rel("u", max(5, (last_line - 5)));
 +		move_rel('u', max(5, (last_line - 5)));
  	else if (in == 8)	/* control h	*/
  		delete(TRUE);
  	else if (in == 9)	/* control i	*/
 @@ -1314,7 +1313,7 @@ emacs_control()
  	else if (in == 21)	/* control u	*/
  		bottom();
  	else if (in == 22)	/* control v	*/
 -		move_rel("d", max(5, (last_line - 5)));
 +		move_rel('d', max(5, (last_line - 5)));
  	else if (in == 23)	/* control w	*/
  		del_word();
  	else if (in == 24)	/* control x	*/
 @@ -1549,9 +1548,9 @@ function_key()				/* process function ke
  	else if (in == KEY_DOWN)
  		down();
  	else if (in == KEY_NPAGE)
 -		move_rel("d", max( 5, (last_line - 5)));
 +		move_rel('d', max( 5, (last_line - 5)));
  	else if (in == KEY_PPAGE)
 -		move_rel("u", max(5, (last_line - 5)));
 +		move_rel('u', max(5, (last_line - 5)));
  	else if (in == KEY_DL)
  		del_line();
  	else if (in == KEY_DC)
 @@ -1989,7 +1988,7 @@ char *cmd_str;
  	int number;
  	int i;
  	char *ptr;
 -	char *direction = "d";
 +	char direction = '\0';
  	struct text *t_line;
  
  	ptr = cmd_str;
 @@ -2006,12 +2005,12 @@ char *cmd_str;
  	{
  		i++;
  		t_line = t_line->prev_line;
 -		direction = "u";
 +		direction = 'u';
  	}
  	while ((t_line->line_number < number) && (t_line->next_line != NULL))
  	{
  		i++;
 -		direction = "d";
 +		direction = 'd';
  		t_line = t_line->next_line;
  	}
  	if ((i < 30) && (i > 0))
 @@ -2020,7 +2019,7 @@ char *cmd_str;
  	}
  	else
  	{
 -		if (!strcmp(direction, "d"))
 +		if (direction != 'd')
  		{
  			absolute_lin += i;
  		}
 @@ -2217,7 +2216,7 @@ check_fp()		/* open or close files accor
  		if (start_at_line != NULL)
  		{
  			line_num = atoi(start_at_line) - 1;
 -			move_rel("d", line_num);
 +			move_rel('d', line_num);
  			line_num = 0;
  			start_at_line = NULL;
  		}
 @@ -2660,7 +2659,7 @@ int display_message;
  		{
  			if (lines_moved < 30)
  			{
 -				move_rel("d", lines_moved);
 +				move_rel('d', lines_moved);
  				while (position < iter)
  					right(TRUE);
  			}
 @@ -2730,8 +2729,8 @@ del_char()			/* delete current character
  	}
  	else
  	{
 -		right(FALSE);
 -		delete(FALSE);
 +		right(TRUE);
 +		delete(TRUE);
  	}
  }
  
 @@ -2940,13 +2939,13 @@ while ((position < curr_line->line_lengt
  
  void 
  move_rel(direction, lines)	/* move relative to current line	*/
 -char *direction;
 +char direction;
  int lines;
  {
  	int i;
  	char *tmp;
  
 -	if (*direction == 'u')
 +	if (direction == 'u')
  	{
  		scr_pos = 0;
  		while (position > 1)
 
 Modified: stable/8/contrib/ee/ee_version.h
 ==============================================================================
 --- stable/8/contrib/ee/ee_version.h	Sun Oct 24 17:42:41 2010	(r214286)
 +++ stable/8/contrib/ee/ee_version.h	Sun Oct 24 18:12:11 2010	(r214287)
 @@ -2,5 +2,5 @@
   |	provide a version number for ee
   */
  
 -#define EE_VERSION "1.5.0"
 -#define DATE_STRING "$Date: 2009/02/17 03:32:30 $"
 +#define EE_VERSION "1.5.2"
 +#define DATE_STRING "$Date: 2010/06/04 02:35:35 $"
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
