`Run Selection`... keybinding broken after selecting `Go to Code` in Python Interactive
See original GitHub issueEnvironment data
- VS Code version: 1.32.1
- Extension version (available under the Extensions sidebar): 2019.3.6558
- OS and version: OS X 10.13.6
- Python version (& distribution if applicable, e.g. Anaconda): 3.7.2
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): pipenv
- Relevant/affected Python packages and their versions: Notebook==5.7.8
Expected behaviour
- Run selection of code (shift + enter)
- In Python Interactive use the “Go to code” button
- Run selection again (shift + enter) should rerun in Python Interactive.
Actual behaviour
On 3 shift + enter clears the selected code (as if the key binding for Python Interactive has gone).
Steps to reproduce:
As above
Logs
Output for Python
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Python
)
Nothing reported here on error
Output from Console
under the Developer Tools
panel (toggle Developer Tools on under Help
; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging
)
Error: Illegal argument: character must be non-negative
at Object.t.illegalArgument (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:9)
at new f (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:315)
at new f (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:314)
at translate (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:316)
at getPrecedingText (/Users/will.bowditch/.vscode/extensions/njpwerner.autodocstring-0.3.0/out/extension.js:51)
at changeFollowsRequiredChars (/Users/will.bowditch/.vscode/extensions/njpwerner.autodocstring-0.3.0/out/extension.js:44)
at activateFromEnter (/Users/will.bowditch/.vscode/extensions/njpwerner.autodocstring-0.3.0/out/extension.js:28)
at context.subscriptions.push.vs.workspace.onDidChangeTextDocument (/Users/will.bowditch/.vscode/extensions/njpwerner.autodocstring-0.3.0/out/extension.js:11)
at u.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:43)
at c.$acceptModelChanged (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:496)
at h._doInvokeHandler (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:593)
at h._invokeHandler (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:592)
at h._receiveRequest (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:591)
at h._receiveOneMessage (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:590)
at define.constructor._protocol.onMessage.e (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:588)
at u.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:43)
at e (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:39)
at u.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:43)
at s (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:168)
at Socket.define.constructor._socketDataListener.e (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:168)
at Socket.emit (events.js:182)
at addChunk (_stream_readable.js:279)
at readableAddChunk (_stream_readable.js:264)
at Socket.Readable.push (_stream_readable.js:219)
at Pipe.onread (net.js:636)
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Run Selection ... keybinding broken after selecting Go to Code ...
On 3 shift + enter clears the selected code (as if the key binding for Python Interactive has gone).
Read more >VS Code: Shift+Enter does not send code to Python Interactive
File -> Preferences -> Keyboard Shortcuts -> Type run selection . In the result list, change the keybinding of the shortcuts Run .....
Read more >VS code run selection in interactive window doesn't work
I have some problems running selected python code in the interactive windows. When I press the keybindings (shift + enter) I don't get...
Read more >Visual Studio Code Key Bindings
Here you will find the complete list of key bindings for Visual Studio Code and how to change them.
Read more >Running python code using 'Run selection in Python terminal'
Want to see what some Python code will do when run ? Use the ' Run selection in Python terminal' command from the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Okay I got it to repro. Very weird. I have to use ‘goto code’ for it to repro. Just opening a file and selecting is not enough.
If I switch to a different app it stops reproing. So something with the ‘when’ command is messed up. I’m guessing findInputFocussed (which is a VS code selection context) is not working for some reason.
We might have to create our own findInputFocused.