Vscode: Focus integrated terminal on first startup

Created on 18 Dec 2017  路  8Comments  路  Source: microsoft/vscode

  1. Have tab other than terminal active in panel
  2. Reload the editor
  3. Activate terminal tab
  4. After the shell is loaded focus is not set

terminal_focus

bug help wanted integrated-terminal verified

Most helpful comment

@usernamehw fixed the toggle terminal case, the only remaining issue is clicking the terminal label on the panel (when no terminals are open).

All 8 comments

I can reproduce on mac

Hi @Tyriar , I will create a PR to fix this, since it only needs a minor change..

A proper fix for this is a little tough, the reason is because we need to make sure that the panel is not focused when it shouldn't be (when launching VS Code, when showing but not focusing via the API). Also the reason the focus isn't happening is because of the async terminal initialization. It's also possible that this will go away once https://github.com/xtermjs/xterm.js/issues/955 is fixed.

"A proper fix for this is a little tough" - sorry but it worked well in older versions of VS code, but now is broken. Can you just revert those changes that introduces such bug?

I can confirm that this worked before the terminal got replaced and it is the number one annoying thing now for me in VS Code.

There's a PR out for the toggling terminal portion of this which should land in either the March or April release.

@usernamehw fixed the toggle terminal case, the only remaining issue is clicking the terminal label on the panel (when no terminals are open).

thanks for the progress update @Tyriar

Was this page helpful?
0 / 5 - 0 ratings