Bug 140339 - [patch] sysutils/tmux: don't assume \177 as backspace char
Summary: [patch] sysutils/tmux: don't assume \177 as backspace char
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Wen Heping
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-06 17:50 UTC by swell.k
Modified: 2010-06-04 02:30 UTC (History)
0 users

See Also:


Attachments
erase.diff (944 bytes, patch)
2009-11-06 17:50 UTC, swell.k
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description swell.k 2009-11-06 17:50:01 UTC

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
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2009-11-06 17:50:37 UTC
Responsible Changed
From-To: freebsd-ports-bugs->wen

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 wenheping 2009-11-07 00:50:18 UTC
Hi,

  Thank your patch.
  Does this patch only for FreeBSD or could be used for any OS ?

wen
Comment 3 swell.k 2009-11-07 05:28:11 UTC
wen heping <wenheping@gmail.com> 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
Comment 4 swell.k 2010-06-03 18:07:57 UTC
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 ---
Comment 5 dfilter service freebsd_committer freebsd_triage 2010-06-04 02:26:31 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 <swell.k@gmail.com>
  
  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"
Comment 6 Wen Heping freebsd_committer freebsd_triage 2010-06-04 02:27:51 UTC
State Changed
From-To: open->closed

Committed. Thanks!