-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Add support for solid cursor blinking style #2892
Add support for solid cursor blinking style #2892
Conversation
👍 cursor blinking is annoying |
I'm not sure about this. I would almost think what we'd do is instead let you set your own blink time as a setting. If it's null, we call I would want to hear what
|
@miniksa Originally I had the exact idea just like what you described. Then I opened VSCode to see how it handles cursor options and it got me here. VSCode has |
A side note, VSCode doesn't seem to respect |
Another option to consider is just hooking into the Have a look at the way terminal/src/cascadia/TerminalCore/Terminal.cpp Lines 127 to 129 in 60b94a4
|
Blinking is only binary on/off option, so how about merging cursor blinking attribute and cursor shape attribute into one attribute as "cursorStyle", like "filledbox" vs "static-filledbox", or "blinking-filledbox" vs "filledbox"? The name "solid" for non-blinking cursor is confusing. Normally "solid box" means "filledbox". So "solid-emptybox" may be confusing. I prefer "static" as non-blinking attribute name. The cursor name "filledbox" is rather strange too. I suggest to use name like "solidbox" or "fullbox" (Unicode name) for current "filledbox" attribute value name. The cursor name "vintage" is also not intuitive. How about " quarterblock"? Most people will use just one of "static-solidbox" or "blinking-bar". IMHO, default should be static and solidbox (filledbox). And if WT window lose input focus, cursor should stop blinking and turn into static-emptybox. |
And there is feature request for width of vertical bar and height of filledbox (#3167). These are only applied or meaningful to specific shape of cursor. Having separate attributes for all these may be overly complicated. To prevent such proliferation of cursor attributes and their combinations, cursor style attribute should be limited to single attribute "cursorStyle". For example, "double-bar", "tall-solidbox" with limited variation of blinking and non-blinking. |
Adds support for setting the cursor visibility in Terminal. Visibility is a property entirely independent from whether the cursor is "on" or not. The cursor blinker _should_ change the "IsOn" property. It was actually changing the "Visible" property, which was incorrect. This PR additionally corrects the naming of the method used by the cursor blinker, and makes it do the right thing. I added a pair of tests, one taken straight from conhost. In copy-pasting that test, I took it a step further and implemented `^[[?12h`, `^[[?12l`, which enables/disables cursor blinking, for the `TerminalCore`. THIS DOES NOT ADD SUPPORT FOR DISABLING BLINKING IN THE APP. Conpty doesn't emit the blinking on/off sequences quite yet, but when it _does_, the Terminal will be ready. ## References * I'd bet this conflicts with #2892 * This isn't a solution for #1379 * There shockingly isn't an issue for cursor blink state via conpty...? ## PR Checklist * [x] Closes #3093 * [x] Closes #3499 * [x] Closes #4644 * [x] I work here * [x] Tests added/passed * [n/a] Requires documentation to be updated
@3dWrecker Lucky you. That was fixed recently by #6337 . Well not exactly fixed, but it's way better now. |
This PR is stale and no longer valid. Close it for now. |
Could there be an option to animate the blinking, by fading it in and out? |
Summary of the Pull Request
Added cursor blinking style. Mainly for solid cursor blinking style which simply disables binking.
References
PR Checklist
Detailed Description of the Pull Request / Additional comments
The idea is from #1379 and VSCode. VSCode has several cursor blinking style, including
blink
,solid
, and other animated styles.Validation Steps Performed
Add configurationi to profile and see how it looks like: