From owner-svn-src-all@FreeBSD.ORG Thu Apr 17 14:18:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1C0835C; Thu, 17 Apr 2014 14:18:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 DDCE31434; Thu, 17 Apr 2014 14:18:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3HEIUXp075342; Thu, 17 Apr 2014 14:18:30 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3HEIUQm075341; Thu, 17 Apr 2014 14:18:30 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201404171418.s3HEIUQm075341@svn.freebsd.org> From: Aleksandr Rybalko Date: Thu, 17 Apr 2014 14:18:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264611 - stable/10/sys/dev/vt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2014 14:18:31 -0000 Author: ray Date: Thu Apr 17 14:18:30 2014 New Revision: 264611 URL: http://svnweb.freebsd.org/changeset/base/264611 Log: MFC r264258 Fix cursor color in reverse video mode. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/vt_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/vt_core.c ============================================================================== --- stable/10/sys/dev/vt/vt_core.c Thu Apr 17 14:16:02 2014 (r264610) +++ stable/10/sys/dev/vt/vt_core.c Thu Apr 17 14:18:30 2014 (r264611) @@ -652,24 +652,26 @@ static inline void vt_determine_colors(term_char_t c, int cursor, term_color_t *fg, term_color_t *bg) { + term_color_t tmp; + int invert; + + invert = 0; *fg = TCHAR_FGCOLOR(c); if (TCHAR_FORMAT(c) & TF_BOLD) *fg = TCOLOR_LIGHT(*fg); *bg = TCHAR_BGCOLOR(c); - if (TCHAR_FORMAT(c) & TF_REVERSE) { - term_color_t tmp; + if (TCHAR_FORMAT(c) & TF_REVERSE) + invert ^= 1; + if (cursor) + invert ^= 1; + if (invert) { tmp = *fg; *fg = *bg; *bg = tmp; } - - if (cursor) { - *fg = *bg; - *bg = TC_WHITE; - } } static void