microsoft / vscode-python

Python extension for Visual Studio Code
https://aka.ms/pvsc-marketplace
MIT License
4.28k stars 1.17k forks source link

Make python.execInREPL keep focus on editor #23843

Open abielr opened 1 month ago

abielr commented 1 month ago

When I am in a Python editor and run python.execInREPL it will send selected code to the Python REPL and then switch the window focus. I would like the option to keep the focus on the editor window, similar to the behavior of Jupyter's Run Selection/Line in Interactive Window.

github-actions[bot] commented 1 month ago

Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 7 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue.

stevenae commented 1 month ago

This was added as a feature years ago[1]. Seems like a regression and therefore a bug:

1 - https://github.com/microsoft/vscode-python/issues/60 / https://github.com/microsoft/vscode-python/pull/651

hutch3232 commented 1 month ago

I think the difference is that this issue is for the new native REPL and the linked issue/PR is for the terminal based REPL. But I think having these as a reference is useful for extra context.

hutch3232 commented 3 days ago

It looks like there is quite a bit of interest in this. Has now exceeded the required 7 upvotes. Hope this feature gets taken up!