Copy and paste breaks intermittently in Python Interactive Window
JPIvan opened this issue · 6 comments
Bug: Interactive Window, Editor cells
The issue regarding double copy-pasting in the Python Interactive Window (PIW) from 1.47 / 1.47.1 seems to have been 'resolved' with the update to 1.47.2, however it has been replaced by a new problem.
The PIW does not "play nice" witheither copying or pasting now.
Steps to cause the bug to occur
- type text "aa" into editor window.
- copy text "aa" from editor window.
- paste text "aa" into editor window.
- paste text "aa" into PIW.
- clear text (backspace x2) from PIW.
- type text "bb" into PIW.
- select and copy text "bb" from PIW.
- go to end of line in PIW, newline and paste text "bb" into PIW.
- paste text "bb" into editor window
Actual behavior
Editor window:
- displays
aa
- displays
aa
aa
- displays
aa
aa
aa
PIW:
4. displays aa
6. displays bb
8. displays
bb
aa
Expected behavior
Editor window:
- displays
aa
- displays
aa
aa
- displays
aa
aa
bb
PIW:
4. displays aa
6. displays bb
8. displays
bb
bb
Jupyter and/or Python environment
- Jupyter server running: Local
- Extension version: v2020.7.94776
- VS Code version: 1.47.2
- Setting python.jediEnabled: NA
- python.languageServer instead
- Setting python.languageServer: Jedi
- **Python and/or Anaconda version: 3.7.4
- OS: Windows
- Virtual environment: virtualenv
Developer Tools Console Output
Console output:
TMScopeRegistry.ts:45 Overwriting grammar scope name to file mapping for scope source.yaml.
Old grammar file: file:///c%3A/Users/user/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/extensions/yaml/syntaxes/yaml.tmLanguage.json.
New grammar file: file:///c%3A/Users/user/.vscode/extensions/redhat.vscode-yaml-0.9.1/syntaxes/yaml.tmLanguage.json
register @ TMScopeRegistry.ts:45
s @ TMGrammarFactory.ts:73
_getOrCreateGrammarFactory @ abstractTextMateService.ts:246
async function (async)
_getOrCreateGrammarFactory @ abstractTextMateService.ts:235
(anonymous) @ abstractTextMateService.ts:271
_registerDefinitionIfAvailable @ abstractTextMateService.ts:269
(anonymous) @ abstractTextMateService.ts:181
fire @ event.ts:587
_getOrCreateMode @ modeServiceImpl.ts:166
_createModeAndGetLanguageIdentifier @ modeServiceImpl.ts:142
(anonymous) @ modeServiceImpl.ts:135
l @ modeServiceImpl.ts:28
createByFilepathOrFirstLine @ modeServiceImpl.ts:133
getOrCreateMode @ textEditorModel.ts:134
createTextEditorModel @ textEditorModel.ts:90
doCreateTextModel @ textFileEditorModel.ts:423
loadFromContent @ textFileEditorModel.ts:407
loadFromBackup @ textFileEditorModel.ts:292
async function (async)
loadFromBackup @ textFileEditorModel.ts:289
load @ textFileEditorModel.ts:277
async function (async)
load @ textFileEditorModel.ts:269
resolve @ textFileEditorModelManager.ts:309
doResolveAsText @ fileEditorInput.ts:243
resolve @ fileEditorInput.ts:235
setInput @ textFileEditor.ts:102
async function (async)
setInput @ textFileEditor.ts:100
doSetInput @ editorControl.ts:177
openEditor @ editorControl.ts:66
(anonymous) @ editorGroupView.ts:979
doShowEditor @ editorGroupView.ts:977
restoreEditors @ editorGroupView.ts:462
e @ editorGroupView.ts:213
_createInstance @ instantiationService.ts:110
createInstance @ instantiationService.ts:76
createFromSerialized @ editorGroupView.ts:65
doCreateGroupView @ editorPart.ts:532
fromJSON @ editorPart.ts:1008
_deserializeNode @ gridview.ts:1210
(anonymous) @ gridview.ts:1203
_deserializeNode @ gridview.ts:1201
_deserialize @ gridview.ts:1194
deserialize @ gridview.ts:1188
deserialize @ grid.ts:576
doCreateGridControlWithState @ editorPart.ts:1002
doCreateGridControlWithPreviousState @ editorPart.ts:969
doCreateGridControl @ editorPart.ts:934
createContentArea @ editorPart.ts:827
create @ part.ts:76
(anonymous) @ workbench.ts:347
renderWorkbench @ workbench.ts:344
(anonymous) @ workbench.ts:152
invokeFunction @ instantiationService.ts:61
startup @ workbench.ts:132
open @ desktop.main.ts:123
async function (async)
open @ desktop.main.ts:111
t.main @ desktop.main.ts:328
(anonymous) @ workbench.js:66
Promise.then (async)
(anonymous) @ workbench.js:62
(anonymous) @ bootstrap-window.js:128
t._invokeFactory @ loader.js:1066
t.complete @ loader.js:1076
s._onModuleComplete @ loader.js:1697
s._onModuleComplete @ loader.js:1709
s._resolve @ loader.js:1657
s.defineModule @ loader.js:1304
r @ loader.js:1747
c @ loader.js:811
(anonymous) @ workbench.common.main.ts:132
(anonymous) @ fake:1
t._createAndEvalScript @ loader.js:814
(anonymous) @ loader.js:796
u @ loader.js:915
(anonymous) @ loader.js:931
readFileAfterClose @ internal/fs/read_file_context.js:61
2console.ts:137 [Extension Host] (node:13328) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
t.log @ console.ts:137
$logExtensionHostMessage @ mainThreadConsole.ts:39
_doInvokeHandler @ rpcProtocol.ts:402
_invokeHandler @ rpcProtocol.ts:387
_receiveRequest @ rpcProtocol.ts:303
_receiveOneMessage @ rpcProtocol.ts:230
(anonymous) @ rpcProtocol.ts:105
fire @ event.ts:587
fire @ ipc.net.ts:453
_receiveMessage @ ipc.net.ts:733
(anonymous) @ ipc.net.ts:592
fire @ event.ts:587
acceptChunk @ ipc.net.ts:239
(anonymous) @ ipc.net.ts:200
t @ ipc.net.ts:28
emit @ events.js:203
addChunk @ _stream_readable.js:295
readableAddChunk @ _stream_readable.js:276
Readable.push @ _stream_readable.js:210
onStreamRead @ internal/stream_base_commons.js:166
console.ts:137 [Extension Host] Starting WebSocket: RAW/api/kernels/70a13a65-cf1e-4d3e-9f50-d9687f2cc7d6
console.ts:137 [Extension Host] Kernel: connected (70a13a65-cf1e-4d3e-9f50-d9687f2cc7d6)
webviewElement.ts:160 [Embedded Page] Starting WebSocket: BOGUS_PVSC/api/kernels/70a13a65-cf1e-4d3e-9f50-d9687f2cc7d6
webviewElement.ts:160 [Embedded Page] Kernel: connected (70a13a65-cf1e-4d3e-9f50-d9687f2cc7d6)
webviewElement.ts:160 [Embedded Page] Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/Microsoft/monaco-editor#faq
webviewElement.ts:160 [Embedded Page] Failed to construct 'Worker': Script at 'vscode-webview-resource://30687aa5-a0bd-4067-8d4e-5a754bbaaba2/file///d%3A/fullpathremoved/editor.worker.js' cannot be accessed from origin 'vscode-webview://30687aa5-a0bd-4067-8d4e-5a754bbaaba2'.
console.ts:137 [Extension Host] Starting WebSocket: RAW/api/kernels/d2ff09f2-31ce-4320-98f2-bfe8357e3642
console.ts:137 [Extension Host] Kernel: connected (d2ff09f2-31ce-4320-98f2-bfe8357e3642)
Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer, @joyceerhl
Hi @JPIvan , I am unable repro at this time given the instructions you have provided.
Could you post a gif recording?
I'm experiencing the same issue after the latest update.
Me too!
Dupe of microsoft/vscode-python#13016
@greazer This does not seem to be a dup of microsoft/vscode-python#13016 , but indeed of the bug that I reported microsoft/vscode-python#13042. This seems to do with the window group focus (please note my workaround), and while it might be related, the functionality involved and side-effects are not similar to the upstream bug microsoft/vscode#103200 mentioned in microsoft/vscode-python#13016. I would vote to re-open.