krish-r / vscode-toggle-terminal

VS Code extension that adds a toggle icon (shortcut) in the status bar.
https://marketplace.visualstudio.com/items?itemName=krish-r.vscode-toggle-terminal
MIT License
6 stars 3 forks source link

Toggle does nothing upon first click if in Problem panel #1

Open gobbedy opened 1 year ago

gobbedy commented 1 year ago

Hello,

First off, thank you! I was really hoping exactly this extension existed, and it does. Very nice.

Now to the issue.. When I'm in the Problem panel (or tab? not sure what the right word is) and I click the icon, nothing happens upon the first click.

It only goes to the Terminal panel upon clicking a second time.

Not a big deal, but I'd have expected it to go the terminal panel upon the first click?

Thanks in advance!

gobbedy commented 1 year ago

Oh, I just read your Readme and I see that it's a known issue. No worries! Still a great extensions. Thanks again. Closing as this is a known issue.

gobbedy commented 1 year ago

Sorry if this is a dumb question, but I just realized that the Ctrl+` shortcut (ie the View: Toggle Terminal command) to toggle the Terminal does not exhibit the same issue. That is, when the "Problem" panel is open, typing Ctrl+` jumps straight to the Terminal.

Would it be possible to get the icon to behave exactly like the View: Toggle Terminal command?

krish-r commented 1 year ago

Hello,

Thanks for your kind comments.

No, not a dumb question. Actually, ctrl +` (View: Toggle Terminal command: workbench.action.terminal.toggleTerminal) was my first choice as well. :smile:

Initially, I tried to simply execute that command in the extension. But that command does not seem to toggle the terminal once the focus is on the terminal. (found an old issue discussing about the command behavior).

I also tried to look for the API/how the command is implemented, and unfortunately I couldn't find that either.

So, I have posted my question today on the VS Code discussion section for workarounds. Need to wait and see if there are better solutions to this issue.

Thanks

gobbedy commented 1 year ago

Thanks @krish-r for looking into it!!

krish-r commented 1 year ago

So, I have posted my https://github.com/microsoft/vscode-discussions/discussions/478 today on the VS Code discussion section for workarounds. Need to wait and see if there are better solutions to this issue.

Hello,

I received response from VS Code developers, looks like there isn't a workaround as of now. (I will watch out for updates on https://github.com/microsoft/vscode/issues/117980.)

Thanks