vscode-code-runner icon indicating copy to clipboard operation
vscode-code-runner copied to clipboard

preserveFocus didnot work when runInTerminal set true and Terminal appeared

Open wantg opened this issue 4 years ago • 5 comments

  • VS Code Version: 1.52.1
  • OS Version: MacOS 11.1
  • Code Runner Version: 0.11.2

1.set preserveFocus and runInTerminal are true 2.close panel to ensure the terminal is hidden 3.run any code file 4.run finished everything is ok and the cursor is focused on the code editor 5.run again 6.cursor focused on terminal

wantg avatar Jan 07 '21 01:01 wantg

Did you set "code-runner.clearPreviousOutput": true ? Try to change to false.

iliiliili avatar Jan 14 '21 11:01 iliiliili

Did you set "code-runner.clearPreviousOutput": true ? Try to change to false.

Yes keep previous output is worked. Can runner take focus back to editor after clear output?

wantg avatar Jan 15 '21 09:01 wantg

Hello there. I am also a mac user. Here's my similar problem: When set "code-runner.clearPreviousOutput": false, I am able to preserve the focus on the editor. However, when set "code-runner.clearPreviousOutput": true, there is no way to perserve the focus.

s3cret avatar Mar 13 '21 11:03 s3cret

Maybe you can try:

  1. set "code-runner.clearPreviousOutput" = false
  2. open setting.json, set "code-runner.executorMap": { "python": "clear && python "} other languages are same

ghost avatar Jun 15 '21 03:06 ghost

Hey! If some of you really care I just published extension with quick workaround for this https://marketplace.visualstudio.com/items?itemName=zardoy.terminal-code-runner

zardoy avatar Jan 02 '22 22:01 zardoy