msknathan / mintty

Automatically exported from code.google.com/p/mintty
GNU General Public License v3.0
0 stars 0 forks source link

Cursor becoming invisible in some circumstances #340

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install the jellybeans color scheme for vim ( 
https://github.com/nanotech/jellybeans.vim )
2. Open a C (or similar) file in vim
3. Apply jellybeans color scheme
4. Navigate to a bracket or brace that has a visible closing mate.

What is the expected output? What do you see instead?
I expected something closer to what Xterm displays.
See attached image.  Note the cursor position listed in the status line

What versions of mintty, Cygwin/MSYS, and Windows are you using?
mintty 1.0.3, Cygwin 1.7.15, Windows 7

Please provide any additional information below.

Original issue reported on code.google.com by BeSwe...@gmail.com on 28 May 2012 at 8:35

Attachments:

GoogleCodeExporter commented 9 years ago
Please explain what's actually wrong with the cursor and what's noteworthy 
about the cursor position.

Original comment by andy.koppe on 29 May 2012 at 11:35

GoogleCodeExporter commented 9 years ago
The noteworthy issue here is that the cursor in the image is actually on line 
4, on the opening brace, but it appears as if it were on the closing brace, on 
line 7.

I've experienced this issue with other vim colors schemes, such as solarized 
(http://ethanschoonover.com/solarized). With this file for mintty: 
https://github.com/mavnn/mintty-colors-solarized/blob/master/.mintty.dark, vim 
behaves correctly visually matching braces and parentheses, but that forces me 
to use a red cursor. My original .minttyrc file looked almost identical, except 
it had a different cursor color. (I had also translated the X-resources file 
from the solarized distribution to minnty, but for vim to work correctly I had 
to change the cursor to be red!)

I'm not sure what needs to be fixed here, the vim color schemes, vim, mintty, 
or something else.

Original comment by HC.L...@gmail.com on 1 Jun 2012 at 8:56

GoogleCodeExporter commented 9 years ago
Thanks, I've finally got around to having a look at this. It is a mintty issue. 
Apologies for not getting to it sooner.

What happens is that mintty looks at the background colour of the cell that the 
cursor is in, and if it's too close to the cursor colour, it uses the default 
background colour instead, to try to make sure that the cursor is visible.

This scheme works nicely when there's a whole white row, or at least a few 
adjacent cells, but it falls flat in a case like this where just the one cell 
has a different colour.

Here, the greyish green brace highlight is considered too close to the default 
light grey cursor colour, but showing it in the background colour instead makes 
it invisible.

I'll need to think of a better scheme then ...

Original comment by andy.koppe on 10 Oct 2012 at 12:06

GoogleCodeExporter commented 9 years ago
Fixed in r1290 on 1.1 branch.

Original comment by andy.koppe on 11 Oct 2012 at 11:40

GoogleCodeExporter commented 9 years ago

Original comment by andy.koppe on 23 Oct 2012 at 12:03

GoogleCodeExporter commented 9 years ago
Confirmed fix in 1.1.3.

Original comment by andy.koppe on 7 Apr 2013 at 1:00