Skip to content

"Run selection/line in Python terminal" does not copy the code into the terminal from the start of the selection #174

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

Closed
DonJayamanne opened this issue Nov 14, 2017 · 3 comments · Fixed by #592
Assignees
Labels
area-terminal bug Issue identified by VS Code Team member as probable bug windows
Milestone

Comments

@DonJayamanne
Copy link

From @dalyIsaac on August 12, 2017 0:45

Environment data

VS Code version: 1.15.0
Python Extension version: 0.7.0
Python Version: 3.6.1
OS and version: Windows 10 (OS Build 16257.1) Pro

Actual behavior

After selecting an area of code and the option to "Run selection/line in Python terminal", code is copied into the terminal, but not from the start of the selection.
2017-08-12_12-32-43
Repeatedly trying to "Run selection/line in Python terminal", after closing the terminal each time results in the code copied into the terminal starting at different points each time.
2017-08-12_12-42-08

Expected behavior

All the code is copied into the Python terminal

Steps to reproduce:

  • Select some code
  • Right click
  • Click "Run selection/line in Python terminal"

Logs

Output from Python output panel
N/A
Output from Console window (Help->Developer Tools menu)
N/A

Copied from original issue: DonJayamanne/pythonVSCode#1163

@DonJayamanne
Copy link
Author

From @dalyIsaac on August 25, 2017 2:0

This only occurs when the integrated shell is set to Powershell. If it's set to cmd.exe, it doesn't occur

@brettcannon brettcannon added awaiting 1-verification area-terminal bug Issue identified by VS Code Team member as probable bug labels Nov 14, 2017
@ericsnowcurrently ericsnowcurrently self-assigned this Jan 8, 2018
@ericsnowcurrently
Copy link

I was also unable to reproduce this under Linux.

@DonJayamanne
Copy link
Author

DonJayamanne commented Jan 9, 2018

We need to add a slight delay to ensure the terminal and python repl are both ready to accept input.
Unfortunately the only way of doing this is to add a slight delay (around 1 second for each, totalling to 2 seconds) before sending any subsequent text to the terminal. However this delay is only necessary the first time the terminal is created.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-terminal bug Issue identified by VS Code Team member as probable bug windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants