From owner-svn-ports-all@freebsd.org Thu Aug 4 13:19:35 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D47FCBAE117; Thu, 4 Aug 2016 13:19:35 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8735717BD; Thu, 4 Aug 2016 13:19:35 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u74DJY3K032745; Thu, 4 Aug 2016 13:19:34 GMT (envelope-from mat@FreeBSD.org) Received: (from mat@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u74DJYlN032743; Thu, 4 Aug 2016 13:19:34 GMT (envelope-from mat@FreeBSD.org) Message-Id: <201608041319.u74DJYlN032743@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mat set sender to mat@FreeBSD.org using -f From: Mathieu Arnold Date: Thu, 4 Aug 2016 13:19:34 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r419609 - in head/sysutils/tmux: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Aug 2016 13:19:35 -0000 Author: mat Date: Thu Aug 4 13:19:34 2016 New Revision: 419609 URL: https://svnweb.freebsd.org/changeset/ports/419609 Log: Fix some Unicode characters not displaying correctly. PR: 211499 Submitted by: Oleg Gushchenkov Obtained from: https://github.com/tmux/tmux/commit/65e4c57d3a554940ed5cada6dfeff403ae8d9572 Sponsored by: Absolight Added: head/sysutils/tmux/files/patch-utf8.c (contents, props changed) Modified: head/sysutils/tmux/Makefile (contents, props changed) Modified: head/sysutils/tmux/Makefile ============================================================================== --- head/sysutils/tmux/Makefile Thu Aug 4 12:53:33 2016 (r419608) +++ head/sysutils/tmux/Makefile Thu Aug 4 13:19:34 2016 (r419609) @@ -3,6 +3,7 @@ PORTNAME= tmux PORTVERSION= 2.2 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= https://github.com/tmux/tmux/releases/download/${PORTVERSION}/ DISTFILES= ${DISTNAME}${EXTRACT_SUFX} Added: head/sysutils/tmux/files/patch-utf8.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/tmux/files/patch-utf8.c Thu Aug 4 13:19:34 2016 (r419609) @@ -0,0 +1,34 @@ +commit 65e4c57d3a554940ed5cada6dfeff403ae8d9572 +Author: Nicholas Marriott +Date: 2016-04-29 12:47:15 +0100 + + Only assume width 1 when wcwidth() returns -1 on non-OpenBSD platforms. + +--- utf8.c.orig 2016-03-02 18:29:06 UTC ++++ utf8.c +@@ -115,8 +115,24 @@ utf8_width(wchar_t wc) + int width; + + width = wcwidth(wc); +- if (width < 0 || width > 0xff) ++ if (width < 0 || width > 0xff) { ++ log_debug("Unicode %04x, wcwidth() %d", wc, width); ++ ++#ifndef __OpenBSD__ ++ /* ++ * Many platforms (particularly and inevitably OS X) have no ++ * width for relatively common characters (wcwidth() returns ++ * -1); assume width 1 in this case. This will be wrong for ++ * genuinely nonprintable characters, but they should be ++ * rare. We may pass through stuff that ideally we would block, ++ * but this is no worse than sending the same to the terminal ++ * without tmux. ++ */ ++ if (width < 0) ++ return (1); ++#endif + return (-1); ++ } + return (width); + } +