This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Some questions about mintty



> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]