Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix focus and configuration handling of the integrated terminal #15958
Although they result in a same usability/keybinding problem I initially described in #15103, my description was a little fuzzy because I didn't understand the cause fully.
There are currently 2 problems:
Problem Nr. 1
Whenever a second (or third, …) terminal instance gets exited via the shell command
This hinders the workflow when working with multiple terminals, because you can't close a second one without refocusing the panel again, worst case scenario would be that a user write
The only case where focus has to change is if there is only 1 instance left, in this case the panel closes itself so the user has a visual clue about whats going on.
Just in case anyone asks, the reasoning I used focus(true) in setActiveInstanceByIndex() instead of inside _removeInstance() just in case there are some edge cases I didn't stumble upon yet. I'd guess you always want to focus your active instances, but correct me if I'm wrong.
Problem Nr. 2
To make the terminal work with various keyboard shortcuts, the setting
Currently, the settings are only handled in the panel itself when _updateCommandsToSkipShell() is called (whenever the panel gets opened). If you create a new instance with either the
Calling the function to skip the commands from inside TerminalService#createInstance() made most sense to me because it's already aware of the settings, but correct me again if I'm wrong with this assumption.
Just noticed while checking for the cause of another issue that I included
Last commit doesn't change any behaviour, just a cleanup. Travis was green before this, Appveyor timed out, maybe we are lucky and they get both green this time around