New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
visibility issue with non-blinking block cursor #1101
Comments
I don't reproduce this. For me, the character under the cursor is visible. What are your relevant settings? |
On Fri, Apr 23, 2021, at 10:52, mintty wrote:
I don't reproduce this. For me, the character under the cursor is
visible. What are your relevant settings?
In ~/.minttyrc:
CursorType=block
ForegroundColour=88,19,44
BackgroundColour=184,121,161
CursorColour=23,179,250
And then the command line:
…--CursorBlinks=yes
I have attached a screenshot showing the nano editor. The cursor is in the second row of the edit panel.
Interestingly, the letter ('V') gets visible (kind of shines through) as soon as the mintty Window loses the focus.
Ronald
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1101 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABT3DEKLYXSNJDSEWFRVBHDTKEYNXANCNFSM43OE4GYQ>.
--
Ronald Fischre ***@***.***>
|
The cursor position character is clearly visible, please test on the command line. |
Nearly. The colours are a bit different. The other settings are the same. I also suspected a shell issue. The shell here is zsh, and I use the syntax colouring package from zsh, which colours the commanline. However, I tried the same in a bash subshell, where I don't have such modifications. The effect is the same. Would you like a screenshot of this too? |
OK, I now see, why you can't reproduce it. It was my mistake when I wrote
Actually, the offending setting is
The cursor does LOOK like a block cursore with this setting, and that's why I mistakingly assumed I had the block cursor turned on. Actually, the cursor setting in my scripts come via the -o option, not from the config file. As a reproducible example, I have included a configuration file, and if I put the file into my theme directory and start mintty with the command
I can see the effect described in this issue. Actually, the line cursor looks like a somewhat smaller block rather than a vertical line. Perhaps the problem is the width of the line cursor in pixels? Can this be adjusted by some setting? |
Please try |
A backspace would erase the previous character. We want to have the cursor on top of it. Hence would be the appropriate key to test, I think. In the enclosed screenshot, I did as you said, but pressed twice after |
Colours are different again but that shouldn't matter. Last idea I have for now: |
Well, I actually tried for the safe side a
(where cfg.txt is the config file I had uploaded here earlier), and you can see the result in the screenshot. Could you post a screenshot how the effect of the very same command looks when you are doing it? |
Now we have something: I guess your line cursor is opaque too, like mine. It's just that yours is so thin that it fits between two characters, while mine is several pixels wide and covers a good part of the character. Now it's really a Windows-question: Can Windows be told to make a line cursor inverting, like a block cursor, or is this simply not possible? |
Well, then it's actually not a line cursor anymore (by Windows settings), so why don't you just use a mintty block cursor? |
I don't know why your Windows system parameters got so misconfigured about caret width but I've commit a change to limit the line cursor width like that of underlines, strikeouts etc. |
Not sure that this has to do with Windows system parameters. If this were the case, the line cursor would look like this everywhere. Checking a few applications, I found that Microsoft Windows indeed has the same line cursor shape like I see on mintty; the NVIM text editor, the Firefox browser and the communication platform Slack show a thin line cursor, exact like in your screenshot. The Windows command console window has a line cursor which is a little bit wider, but not as wide as the one in mintty (maybe 3 pixels wide). The PsPad text editor shows a line cursor which has the same width than a block cursor, but occupies the lower half of the character. From this, I have the impression that each application defines its own shape. |
I think many applications define their own shape. For the line cursor, however, mintty uses: |
I see. So an application can define the caret width, but there is also a system-wide default value for this. This would explain the differences I see between the individual applications. Would it be much work to have the caret width of the line cursor being configurable in mintty, and use the system default only if there is no configuration specified? |
No, but without additional implementation effort the widened caret will overlap the character at the cursor position, just as you encountered with a full-width caret. |
Released 3.5.1. |
A non-blinking block cursor completely hides the character below. This is a nuisance when doing inline-editing of a command or using a texteditor: The character below the cursore, i.e. the editing place, becomes invisible.
It would be great if something could be done to make the character under a non-blinking block cursor somehow visible. Three possibilities come to my mind, but I can't tell which one can possibly be implemented:
The text was updated successfully, but these errors were encountered: