-
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
Sporadic cannot ctrl+D to or enter to close the terminal #17578
Comments
I can't reproduce it on demand but it keeps happening. i did however go back to the released Version: 1.20.11781.0 and this is not a problem. I've moved away from the 'preview' for now because of this issue. It might have to do with mouse tracking. Another example of how the mouse tracking seems to have failed and when i exit the terminal i get the Ctrl+D message |
CTRL-D doesn't close the window either on the preview version. I can confirm that the 'stable' terminal |
I can repro (every time) like this. Start WT normally (one tab, normal window). Note that exiting the lefthand shell then the other one does not cause the error. Ditto for Split Horizontal with "bottom" replacing "right" and the analogous note about which is exitted first. |
It happens in WindowsTerminal 1.21.2406.25002 (preview) and not in WindowsTerminal 1.20.2406.26001. |
This regressed in 5d46e31. Because the content isn't being reset anymore, after a split-pane two panes may share the same content object. Closing one pane will then cause both to be closed. |
@lhecker, If I understand your comment correctly (which may not be the case), then I don't see that. In my experiment, closing either pane leaves the other pane functional. As noted before, closing the new pane causes the original pane to exhibit the problem under discussion when it's closed. But closing the original pane does not cause the new pane to exhibit the problem when it's closed. |
When I said "closed" I was referring to an internal function called "Close" that removes some event handlers from the "content" of a pane. This is what causes Ctrl-D and Enter to seemingly not work. (It was confusingly worded. I'm sorry. 😣) |
I don't know what has changed between #17450 and now, but that fix doesn't seem necessary anymore. If you add this action: ```json { "keys": "ctrl+a", "command": { "action": "splitPane", "commandline": "cmd /c exit" } } ``` and repeatedly spam Ctrl-A it used to lead to crashes. That doesn't happen anymore, because some other PR must've fixed that. Reverting #17450 fixes the issue found in #17578: Because the content pointer didn't get reset to null anymore it meant that the root pane retained the pointer after a split. After closing the split off pane, it would assign the remaining one back to the root, which would cause the still existing content pointer to be closed. That pointer is potentially the same as the remaining pane and so no close events would get received anymore. Closes #17578 ## Validation Steps Performed * Add the above action and spam it ✅ * Start with an empty window, split pane, type `exit` in the new pane then type it in the original pane. It closes the window ✅ (cherry picked from commit 056af83) Service-Card-Id: PVTI_lADOAF3p4s4AmhmszgSGCfE Service-Version: 1.21
Windows Terminal version
Version: 1.21.1772.0
Windows build number
Microsoft Windows [Version 10.0.22631.3880]
Other Software
N/A
Steps to reproduce
No idea how to reproduce. Sometimes, after a long time open and running I notice the "track my mouse" feature stops working between panes and then when i exit the terminal it ends up printing:
but ctrl+d or enter don't exit the pane:
Expected Behavior
I want the "track my mouse" feature to keep working and if i have to close the terminal, i expect the pane to actually close.
Actual Behavior
mouse tracking fails and ctrl+d/enter won't actually close the pane. the whole terminal window needs to be relaunched.
The text was updated successfully, but these errors were encountered: