ports/180787: Prevent tmux from underlying characters unexpectedly

Julio Merino julio+host-mastodon-jmmv at meroh.net
Wed Jul 24 01:20:01 UTC 2013

>Number:         180787
>Category:       ports
>Synopsis:       Prevent tmux from underlying characters unexpectedly
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 24 01:20:00 UTC 2013
>Originator:     Julio Merino
>Release:        FreeBSD 10.0-CURRENT powerpc
System: FreeBSD mastodon.meroh.net 10.0-CURRENT FreeBSD 10.0-CURRENT #2 r253517M: Sun Jul 21 09:10:24 EDT 2013 jmmv at mastodon.meroh.net:/usr/obj/usr/src/sys/GENERIC64 powerpc

	tmux 1.8 has a bug that causes it to unexpectedly underline all
	characters when the status bar requests a bold color.
	This only shows up when sshing into a FreeBSD box from Mac OS
	X's Terminal.app application.  The problem does not appear when
	logging into other systems that run the same version of tmux,
	such as NetBSD or various Linux variants.

	This problem has been fixed in the upstream repository of tmux,
	so I'm proposing to backport the fix to the FreeBSD port because
	this seems to annoyingly affect FreeBSD only.
	Log into a FreeBSD box from OS X and tell tmux to use a bold
	color in its status line.  When you start tmux, or when you
	reattach a session, the whole screen will be underlined.

Index: Makefile
--- Makefile	(revision 323554)
+++ Makefile	(working copy)
@@ -3,6 +3,7 @@
 CATEGORIES=	sysutils
Index: files/patch-tty.c
--- files/patch-tty.c	(revision 0)
+++ files/patch-tty.c	(working copy)
@@ -0,0 +1,26 @@
+Apply upstream commit cbee283c26968304b473e2191d2bb5f52208b58d to prevent
+OS X's Terminal.app turning on underlining when the status bar contains
+bold characters.
+--- tty.c
++++ tty.c
+@@ -220,7 +220,7 @@ tty_start_tty(struct tty *tty)
+ 		tty_puts(tty, "\033[?1000l\033[?1006l\033[?1005l");
+ 	if (tty_term_has(tty->term, TTYC_XT))
+-		tty_puts(tty, "\033[c\033[>4;1m\033[?1004h");
++		tty_puts(tty, "\033[c\033[>4;1m\033[?1004h\033[m");
+ 	tty->cx = UINT_MAX;
+ 	tty->cy = UINT_MAX;
+@@ -283,7 +283,7 @@ tty_stop_tty(struct tty *tty)
+ 		tty_raw(tty, "\033[?1000l\033[?1006l\033[?1005l");
+ 	if (tty_term_has(tty->term, TTYC_XT))
+-		tty_raw(tty, "\033[>4m\033[?1004l");
++		tty_raw(tty, "\033[>4m\033[?1004l\033[m");
+ 	tty_raw(tty, tty_term_string(tty->term, TTYC_RMCUP));

More information about the freebsd-ports-bugs mailing list