www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/06/23/18:54:34

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4A415CF9.5030200@aim.com>
Date: Tue, 23 Jun 2009 18:53:45 -0400
From: Mark Harig <idirectscm AT aim DOT com>
User-Agent: Thunderbird 2.0.0.21 (Windows/20090302)
MIME-Version: 1.0
To: The Cygwin Mailing List <cygwin AT cygwin DOT com>
Subject: Re: Some questions about mintty
X-AOL-IP: 205.188.169.199
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

>
> > 3. When the color of the cursor is changed to a block, the text
> > � can be read through the block, but it appears that the text is
> > � always white.
>
> The background colour is used for text beneath the cursor, so if the
> cursor is visible infront of the background, the text beneath the
> cursor should be visible too. With the default white-on-black colours,
> you get black text inside a white cursor block.
>
> Is it a particular mode or program where you're seeing this problem?

At the bash shell prompt while editing commands is one example, but
it is also the case for me in text editors, vim or emacs, for example.
 From the Options menu, I set the cursor type to block and set the
cursor color to a light color, say, yellow, and then moved the block
cursor back over the text of a command at the shell prompt.
Because the cursor-text color remained white, when it combined
with the light block color, the text inside the cursor block
"disappeared."

>
> > �Can the cursor's (reverse) text color be changed?
>
> Yes, through the xterm sequence for setting colours, where in a small
> extension the default colours are represented as colours 256 through
> 261:
>
> 256 - normal foreground
> 257 - bold foreground
> 258 - normal background
> 259 - bold background
> 260 - cursor background
> 261 - cursor foreground
>
> For example, this sets the cursor background colour (which is used for
> the text beneath it) to black:
>
> echo -e "\e]4;260;#000000\a"

Thank you. That works. I have added the following to ~/.bashrc:

case "$TERM" in
...
xterm)
if [ "$OS" = Windows_NT ]; then
# Set mintty's (block) cursor text color to black
echo -e "\e]4;260;#000000\a"
...
else
...
fi
...
esac


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019