From timur@com.bat.ru  Sat Feb 28 16:50:09 2009
Return-Path: <timur@com.bat.ru>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E1DDC1065670
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 28 Feb 2009 16:50:09 +0000 (UTC)
	(envelope-from timur@com.bat.ru)
Received: from mail.bat.ru (dzokonda.xs4all.nl [194.109.164.75])
	by mx1.freebsd.org (Postfix) with ESMTP id 758538FC16
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 28 Feb 2009 16:50:09 +0000 (UTC)
	(envelope-from timur@com.bat.ru)
Received: from timur.home.bat.ru ([192.168.0.4] verified)
  by mail.bat.ru (CommuniGate Pro SMTP 4.2.7)
  with ESMTP-TLS id 2930010 for FreeBSD-gnats-submit@freebsd.org; Sat, 28 Feb 2009 02:52:11 +0100
Received: (from timur@localhost)
	by timur.home.bat.ru (8.14.1/8.14.1/Submit) id n1S1kXAd059713
	for FreeBSD-gnats-submit@freebsd.org; Sat, 28 Feb 2009 02:46:33 +0100 (CET)
	(envelope-from timur)
Message-Id: <20090228014633.GA59706@com.bat.ru>
Date: Sat, 28 Feb 2009 02:46:33 +0100
From: "Timur I. Bakeyev" <timur@freebsd.org>
Reply-To: "Timur I. Bakeyev" <timur@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Subject: Errors in the "screen" terminal description termcap

>Number:         132199
>Category:       conf
>Synopsis:       Errors in the "screen" terminal description termcap
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    rafan
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 28 17:00:09 UTC 2009
>Closed-Date:    Tue Mar 17 14:30:40 UTC 2009
>Last-Modified:  Tue Mar 17 14:30:40 UTC 2009
>Originator:     Timur I. Bakeyev
>Release:        FreeBSD 7.1-STABLE amd64
>Organization:
Blinck Int.
>Environment:
System: FreeBSD build7.bob.blinck.net 7.1-STABLE FreeBSD 7.1-STABLE #0: Thu Feb 5 18:43:26 UTC 2009 root@build7.bob.blinck.net:/usr/obj/usr/src/sys/BASE amd64


>Description:
	In ncurses applications, namely MC with TERM=screen 'End' button
	doesn't produce any effect.

>How-To-Repeat:
	Compile latest MC from the ports with ncurses and run it under
	'screen'. Press 'End' button - nothing happens, you can't teach MC
	this button either.

>Fix:
	I thought about it as some bug in ncurses, until I came across:
	
	http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92215
	
	Date: Fri, 30 Mar 2001 16:48:13 UTC
	Severity: normal
	Found in versions 5.2.20010318-1, 5.2.20020112a-8
	
	> The problem is that kll is defined to be the same value as
	> kend, and (apparently) ncurses checks kll before kend...
	
	Although, it is related to the terminfo, apparently, our termcap
	was generated from the same source, as it contains:
	
	SC|screen|VT 100/ANSI X3.64 virtual terminal:\
	....
	:kh=\E[1~:kI=\E[2~:kD=\E[3~:kH=\E[4~:@7=\E[4~:kP=\E[5~:\
	
	Where:
	
	key_ll   kll        kH        lower-left key (home down)
	key_end  kend       @7        end key
	
	I'd suggest to use the same approach as Debian used, as kH seems
	close to non-existing, when End key is quite frequent and usefull.

	With regards,
	Timur.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->rafan 
Responsible-Changed-By: rafan 
Responsible-Changed-When: Sun Mar 1 07:02:12 UTC 2009 
Responsible-Changed-Why:  
I'll take it. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: conf/132199: commit references a PR
Date: Sun,  1 Mar 2009 07:08:59 +0000 (UTC)

 Author: rafan
 Date: Sun Mar  1 07:08:46 2009
 New Revision: 189216
 URL: http://svn.freebsd.org/changeset/base/189216
 
 Log:
   - Remove kH (kp_kll) from screen. It has the identical key sequence as
     @7 (kp_end). As ncurses has the limitation that it returns the first
     matched key symbol, you can not use END in ncurses based program under
     screen (like ports/misc/mc).
   
   We did similar changes to xterm entry last year for exactly the same reason.
   
   PR:		132199
   Submitted by:	Timur I. Bakeyev <timur at FreeBSD.org>
   MFC after:	2 month
 
 Modified:
   head/share/termcap/termcap.src
 
 Modified: head/share/termcap/termcap.src
 ==============================================================================
 --- head/share/termcap/termcap.src	Sun Mar  1 07:06:44 2009	(r189215)
 +++ head/share/termcap/termcap.src	Sun Mar  1 07:08:46 2009	(r189216)
 @@ -2771,7 +2771,7 @@ SC|screen|VT 100/ANSI X3.64 virtual term
  	:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=^H:\
  	:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:\
  	:k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:F1=\E[23~:F2=\E[24~:\
 -	:kh=\E[1~:kI=\E[2~:kD=\E[3~:kH=\E[4~:@7=\E[4~:kP=\E[5~:\
 +	:kh=\E[1~:kI=\E[2~:kD=\E[3~:@7=\E[4~:kP=\E[5~:\
  	:kN=\E[6~:eA=\E(B\E)0:as=^N:ae=^O:ti=\E[?1049h:te=\E[?1049l:\
  	:vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l:\
  	:Co#8:pa#64:AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:AX:\
 _______________________________________________
 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: open->patched 
State-Changed-By: rafan 
State-Changed-When: Sun Mar 1 08:08:34 UTC 2009 
State-Changed-Why:  
Fix committed into HEAD. Will MFC in 2 months. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: conf/132199: commit references a PR
Date: Tue, 17 Mar 2009 14:29:52 +0000 (UTC)

 Author: rafan
 Date: Tue Mar 17 14:29:25 2009
 New Revision: 189930
 URL: http://svn.freebsd.org/changeset/base/189930
 
 Log:
   MFC r189216 (ahead original schedule due to the upcoming 7.2-RELEASE)
   
    - Remove kH (kp_kll) from screen. It has the identical key sequence as
      @7 (kp_end). As ncurses has the limitation that it returns the first
      matched key symbol, you can not use END in ncurses based program under
      screen (like ports/misc/mc).
   
    We did similar changes to xterm entry last year for exactly the same reason.
   
    PR:           132199
    Submitted by: Timur I. Bakeyev <timur at FreeBSD.org>
 
 Modified:
   stable/7/share/termcap/   (props changed)
   stable/7/share/termcap/termcap.src
 
 Modified: stable/7/share/termcap/termcap.src
 ==============================================================================
 --- stable/7/share/termcap/termcap.src	Tue Mar 17 14:17:59 2009	(r189929)
 +++ stable/7/share/termcap/termcap.src	Tue Mar 17 14:29:25 2009	(r189930)
 @@ -2771,7 +2771,7 @@ SC|screen|VT 100/ANSI X3.64 virtual term
  	:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=^H:\
  	:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:\
  	:k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:F1=\E[23~:F2=\E[24~:\
 -	:kh=\E[1~:kI=\E[2~:kD=\E[3~:kH=\E[4~:@7=\E[4~:kP=\E[5~:\
 +	:kh=\E[1~:kI=\E[2~:kD=\E[3~:@7=\E[4~:kP=\E[5~:\
  	:kN=\E[6~:eA=\E(B\E)0:as=^N:ae=^O:ti=\E[?1049h:te=\E[?1049l:\
  	:vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l:\
  	:Co#8:pa#64:AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:AX:\
 _______________________________________________
 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: patched->closed 
State-Changed-By: rafan 
State-Changed-When: Tue Mar 17 14:30:39 UTC 2009 
State-Changed-Why:  
Committed to 7.x. Won't do 6.x as there is no more releases planned. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=132199 
>Unformatted:
