Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 Nov 2009 20:44:37 +0300
From:      Anonymous <swell.k@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/140339: [patch] sysutils/tmux: don't assume \177 as backspace char
Message-ID:  <86eiob1ray.fsf@gmail.com>
Resent-Message-ID: <200911061750.nA6Ho1g9087930@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         140339
>Category:       ports
>Synopsis:       [patch] sysutils/tmux: don't assume \177 as backspace char
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 06 17:50:01 UTC 2009
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86eiob1ray.fsf>