microsoft/vscode-jupyter

Switching from code to Python Interactive window causes Copy text command to break

Closed this issue ยท 7 comments

Bug: Notebook Editor, Interactive Window, Editor cells

Steps to cause the bug to occur

  1. Create a Python file with one cell that outputs some text
  2. Execute the cell
  3. Select and copy the text from the Python Interactive window - paste it somewhere - it copied fine
  4. Change the selection in the code window (preferable to a line with some content)
  5. Select and copy other text from the Python Interactive window - paste it somewhere - it copied the text from the code window rather than the Python Interactive window

Actual behavior

Sometimes, when the active window is the Python Interactive window, the text selected in the code window gets copied when I hit Ctrl + C instead of the text in the active window.

issue-copy-paste-python-interactive

Expected behavior

Text selected in the active window will be copied when I hit Ctrl + C.

Your Jupyter and/or Python environment

  • Jupyter server running: Local
  • Extension version: v2020.7.94776
  • VS Code version: 1.47.2 (system setup; commit: 17299e413d5590b14ab0340ea477cdd86ff13daf)
  • Setting python.jediEnabled: false
  • Setting python.languageServer: Microsoft
  • Python and/or Anaconda version: CPython 3.7.4
  • OS: Windows_NT x64 10.0.18362
  • Virtual environment: none (system install)

Developer Tools Console Output

No output

Thanks for the bug report! I was able to repro this. We'll discuss this at our upcoming triage.

Thanks for the reply. Note that this only when switching between window groups. If the Python Interactive Window is in the same window group as another plain code editor, the bug doesn't happen.
I'm pretty sure this bug only showed up after upgrading VS Code. I'm not sure what my previous version was.

Thanks for reporting this. I am not able to copy any text out of the Interactive Output Window. This is very annoying and a big showstopper while using VSCode for Data Science tasks. I hope you can prioritize this with a quick fix.

A partial workaround - put a regular code editor in the same window group. Once that is done, and the cursor is first placed in that code editor, you'll be able to copy. If you need, I can post a gif.

Dupe of #767

This appears to be have been resolved in Insiders 1.48.0. Would you mind giving it a try there and letting us know if the bug persists? ๐Ÿ˜Š

@joyceerhl I just tried weekly insiders version (can't find number) and it's fixed!