From swell.k@gmail.com Fri Nov 6 17:44:46 2009 Return-Path: Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01E191065670 for ; Fri, 6 Nov 2009 17:44:46 +0000 (UTC) (envelope-from swell.k@gmail.com) Received: from mail-ew0-f209.google.com (mail-ew0-f209.google.com [209.85.219.209]) by mx1.freebsd.org (Postfix) with ESMTP id 8A8E78FC14 for ; Fri, 6 Nov 2009 17:44:45 +0000 (UTC) Received: by ewy5 with SMTP id 5so1224307ewy.36 for ; Fri, 06 Nov 2009 09:44:44 -0800 (PST) Received: by 10.213.110.17 with SMTP id l17mr1197622ebp.18.1257529484408; Fri, 06 Nov 2009 09:44:44 -0800 (PST) Received: from localhost (95-24-165-239.broadband.corbina.ru [95.24.165.239]) by mx.google.com with ESMTPS id 28sm965712eyg.22.2009.11.06.09.44.41 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 06 Nov 2009 09:44:42 -0800 (PST) Message-Id: <86eiob1ray.fsf@gmail.com> Date: Fri, 06 Nov 2009 20:44:37 +0300 From: Anonymous To: FreeBSD-gnats-submit@freebsd.org Subject: [patch] sysutils/tmux: don't assume \177 as backspace char >Number: 140339 >Category: ports >Synopsis: [patch] sysutils/tmux: don't assume \177 as backspace char >Confidential: no >Severity: non-critical >Priority: low >Responsible: wen >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Nov 06 17:50:01 UTC 2009 >Closed-Date: Fri Jun 04 01:27:52 UTC 2010 >Last-Modified: Fri Jun 4 01:30:03 UTC 2010 >Originator: Anonymous >Release: FreeBSD 9.0-CURRENT amd64 >Organization: >Environment: System: FreeBSD 9.0-CURRENT #0 198966M: Fri Nov 6 02:38:24 UTC 2009 holo@raphael.local:/a/objdir/a/dirty_build/sys/PHOENIX amd64 >Description: >How-To-Repeat: 1. $ stty erase '^H' (to be sure) 2. $ tmux 3. $ stty erase '^H' 4. try to erase /-search string in less(1) using backspace >Fix: --- erase.diff begins here --- Index: sysutils/tmux/files/patch-tty-keys.c =================================================================== RCS file: sysutils/tmux/files/patch-tty-keys.c diff -N sysutils/tmux/files/patch-tty-keys.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ sysutils/tmux/files/patch-tty-keys.c 6 Nov 2009 16:30:52 -0000 @@ -0,0 +1,21 @@ +--- tty-keys.c~ ++++ tty-keys.c +@@ -248,16 +248,18 @@ tty_keys_next(struct tty *tty, int *key, u_char *mouse) + /* If a normal key, return it. */ + if (*buf != '\033') { + *key = buffer_read8(tty->in); + ++#if 0 + /* + * Check for backspace key using termios VERASE - the terminfo + * kbs entry is extremely unreliable, so cannot be safely + * used. termios should have a better idea. + */ + bspace = tty->tio.c_cc[VERASE]; + if (bspace != _POSIX_VDISABLE && *key == bspace) + *key = KEYC_BSPACE; ++#endif + goto found; + } + + /* Look for matching key string and return if found. */ --- erase.diff ends here --- >Release-Note: >Audit-Trail: Responsible-Changed-From-To: freebsd-ports-bugs->wen Responsible-Changed-By: edwin Responsible-Changed-When: Fri Nov 6 17:50:37 UTC 2009 Responsible-Changed-Why: Over to maintainer (via the GNATS Auto Assign Tool) http://www.freebsd.org/cgi/query-pr.cgi?pr=140339 From: wen heping To: bug-followup@FreeBSD.org, swell.k@gmail.com Cc: Subject: Re: ports/140339: [patch] sysutils/tmux: don't assume \177 as backspace char Date: Sat, 7 Nov 2009 08:50:18 +0800 --001636e0a5ab30385f0477bd5877 Content-Type: text/plain; charset=ISO-8859-1 Hi, Thank your patch. Does this patch only for FreeBSD or could be used for any OS ? wen --001636e0a5ab30385f0477bd5877 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi,
=A0
=A0 Thank your patch.
=A0=A0Does this patch only for FreeBSD or could be us= ed for any OS=20 ?
=A0
wen
--001636e0a5ab30385f0477bd5877-- From: Anonymous To: wen heping Cc: bug-followup@FreeBSD.org Subject: Re: ports/140339: [patch] sysutils/tmux: don't assume \177 as backspace char Date: Sat, 07 Nov 2009 08:28:11 +0300 wen heping writes: > Hi, > =C2=A0 > =C2=A0 Thank your patch. > =C2=A0=C2=A0Does this patch only for FreeBSD or could be used for any OS ? It depends on the bug this patch fixes. However, I'm not sure it'll be accepted upstream because of reaction to bug#2856672 on SF.net. http://sourceforge.net/tracker/?func=3Ddetail&aid=3D2856672&group_id=3D2003= 78&atid=3D973262 > =C2=A0 > wen From: Anonymous To: bug-followup@FreeBSD.org Cc: Subject: Re: ports/140339: [patch] sysutils/tmux: don't assume \177 as backspace char Date: Thu, 03 Jun 2010 17:07:57 +0000 I've updated diff. The bug is that Backspace unconditionally produces \177 even when VERASE uses smth else. This breaks ncurses apps like vi(1), less(1). It may affect non-FreeBSD systems but I haven't tested. --- erase.diff begins here --- Index: sysutils/tmux/files/patch-tty-keys.c =================================================================== RCS file: sysutils/tmux/files/patch-tty-keys.c diff -N sysutils/tmux/files/patch-tty-keys.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ sysutils/tmux/files/patch-tty-keys.c 3 Jun 2010 16:58:23 -0000 @@ -0,0 +1,11 @@ +--- tty-keys.c~ ++++ tty-keys.c +@@ -456,8 +456,6 @@ tty_keys_next(struct tty *tty) + * used. termios should have a better idea. + */ + bspace = tty->tio.c_cc[VERASE]; +- if (bspace != _POSIX_VDISABLE && key == bspace) +- key = KEYC_BSPACE; + goto handle_key; + } + --- erase.diff ends here --- State-Changed-From-To: open->closed State-Changed-By: wen State-Changed-When: Fri Jun 4 01:27:51 UTC 2010 State-Changed-Why: Committed. Thanks! http://www.freebsd.org/cgi/query-pr.cgi?pr=140339 From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: ports/140339: commit references a PR Date: Fri, 4 Jun 2010 01:26:31 +0000 (UTC) wen 2010-06-04 01:26:22 UTC FreeBSD ports repository Modified files: sysutils/tmux Makefile Added files: sysutils/tmux/files patch-tty-keys.c Log: - Fix the bug that tmux don't assume \177 as backspace char PR: ports/140339 Submitted by: Anonymous Revision Changes Path 1.16 +1 -1 ports/sysutils/tmux/Makefile 1.1 +11 -0 ports/sysutils/tmux/files/patch-tty-keys.c (new) _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org" >Unformatted: