Skip to content
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

When changing focus the cursor has significant delay before appearing. #3761

Closed
bradphelan opened this issue Nov 28, 2019 · 2 comments · Fixed by #4032
Closed

When changing focus the cursor has significant delay before appearing. #3761

bradphelan opened this issue Nov 28, 2019 · 2 comments · Fixed by #4032
Labels
Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Area-User Interface Issues pertaining to the user interface of the Console or Terminal Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Milestone

Comments

@bradphelan
Copy link

bradphelan commented Nov 28, 2019

Environment

Platform ServicePack Version      VersionString
-------- ----------- -------      -------------
 Win32NT             10.0.18362.0 Microsoft Windows NT 10.0.18362.0

Windows Terminal (Preview)
Version: 0.7.3291.0

Steps to reproduce

Setup keybindings to change focus. For example

    , {"command": "moveFocusLeft", "keys": ["alt+h"]}
    , {"command": "moveFocusRight", "keys": ["alt+l"]}
    , {"command": "moveFocusUp", "keys": ["alt+k"]}
    , {"command": "moveFocusDown", "keys": ["alt+j"]}

Expected behavior

As soon as I change focus to another pane the cursor should immediately appear in the newly focused pane.

Actual behavior

There is a delay.

If I change focus quickly multiple times using the keybinding it is hard for the eye to track where to focus because the cursor does not ever appear until you stop pressing the focus change key.

There is also the pane border color change on focus but for some reason the color contrast there is difficult for me to track. I prefer to look for the cursor.

What I think is happening is that when you change focus to a new pane the cursor blink state machine starts again from zero and zero is the off state.

A fix might be to have the zero state of the cursor to be on rather than off.

With the mouse

The same problem happens when focusing the pane with the mouse. There is a delay.

Other Applications

I've noticed that the old power shell console and cmd.exe console seem to have the same probem.

gvim seems to get it right. Switching text editing panes quickly shows the cursor immediately.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Nov 28, 2019
@DHowett-MSFT
Copy link
Contributor

Good catch. Thanks!

@DHowett-MSFT DHowett-MSFT added Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. labels Nov 30, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Nov 30, 2019
@DHowett-MSFT DHowett-MSFT added Needs-Tag-Fix Doesn't match tag requirements Priority-3 A description (P3) labels Nov 30, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Nov 30, 2019
@DHowett-MSFT DHowett-MSFT added Help Wanted We encourage anyone to jump in on these. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Nov 30, 2019
@DHowett-MSFT DHowett-MSFT added this to the Terminal v1.0 milestone Nov 30, 2019
@ghost ghost added the In-PR This issue has a related PR label Dec 21, 2019
@ghost ghost closed this as completed in #4032 Dec 30, 2019
ghost pushed a commit that referenced this issue Dec 30, 2019
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? -->
## Summary of the Pull Request

Before, when a terminal window was focused, the blinking cursor would initially be hidden. This PR will immediately show the cursor when the window is focused, making it easier to keep track of the cursor.

<!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> 
## References

#3761

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist
* [x] Closes #3761
* [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
* [ ] Tests added/passed
* [ ] Requires documentation to be updated
* [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

<!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

I guess I'm the cursor guy now

<!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed

* Switched rapidly between different panes, different tabs and focused and unfocused the main window repeatedly.
@ghost ghost added Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed In-PR This issue has a related PR labels Dec 30, 2019
@ghost
Copy link

ghost commented Jan 14, 2020

🎉This issue was addressed in #4032, which has now been successfully released as Windows Terminal Preview v0.8.10091.0.:tada:

Handy links:

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Area-User Interface Issues pertaining to the user interface of the Console or Terminal Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants