ports/140339: [patch] sysutils/tmux: don't assume \177 as backspace char
Anonymous
swell.k at gmail.com
Fri Nov 6 17:50:01 UTC 2009
>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 at 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:
More information about the freebsd-ports-bugs
mailing list