Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inefficient Toggle with Integrated Terminal when Running IPython #11253

Closed
haz-q opened this issue Aug 30, 2016 · 2 comments
Closed

Inefficient Toggle with Integrated Terminal when Running IPython #11253

haz-q opened this issue Aug 30, 2016 · 2 comments
Assignees
Labels
*as-designed Described behavior is as designed terminal Integrated terminal issues
Milestone

Comments

@haz-q
Copy link

haz-q commented Aug 30, 2016

  • VSCode Version: 1.40
  • OS Version: Windows 10 v. 1511
  • IPython Version: 5.1

Steps to Reproduce:

  1. Open integrated terminal and run ipython.
  2. In editor (do not hide terminal window), type print('hello world').
  3. Highlight text and use VS Code command Terminal: Run Selected Text in Active Terminal.

At this stage, the code has loaded into the iPython terminal but has not actually executed.

capture

The user is required to press Enter in the terminal pane to actually execute the code. (Visual Studio Community with PTVS works as expected: the script runs upon Shift+Alt+F5.) You will notice in the screenshot that after running the selected text, the curor is still in the code panel. Therefore, if you press Enter (in an attempt to execute the code in the terminal pane), your selected text in the editor will be deleted. The only way to complete the code run in the terminal is to, after step 3, either (a) mouse over and click in the terminal panel and hit Enter, or (b) hit Ctrl+` twice to hide and show the terminal panel (which will also focus the panel) and then hit Enter. This is inefficient. The code should either fully execute upon the run command (as it does in Visual Studio) or the terminal pane should automatically focus so the user can hit enter to complete the code run.

Note that when the terminal window is hidden at the time the selected code is run, the terminal opens and is simultaneously focused. The user can then hit Enter to complete the run with little additional effort.

@Tyriar
Copy link
Member

Tyriar commented Aug 31, 2016

Right now a \n or \r\n is added to the end of the selected text (if necessary) to indicate to the shell to run it. Not sure what ipython is expecting here.

@Tyriar Tyriar added the help wanted Issues identified as good community contribution opportunities label Aug 31, 2016
@Tyriar Tyriar added this to the Backlog milestone Aug 31, 2016
@Tyriar
Copy link
Member

Tyriar commented Apr 20, 2017

As designed, the Python extension can always polish this experience.

@Tyriar Tyriar closed this as completed Apr 20, 2017
@Tyriar Tyriar added *as-designed Described behavior is as designed and removed help wanted Issues identified as good community contribution opportunities labels Apr 20, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*as-designed Described behavior is as designed terminal Integrated terminal issues
Projects
None yet
Development

No branches or pull requests

3 participants