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

Copy Selection Not Saved #20269

Closed
GeorgSteyn opened this issue Feb 9, 2017 · 2 comments
Closed

Copy Selection Not Saved #20269

GeorgSteyn opened this issue Feb 9, 2017 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@GeorgSteyn
Copy link

  • VSCode Version: 1.9.1
  • OS Version: Ubuntu 16.04

I am trying to copy the folder name and paste it into my code.

Steps to Reproduce:

  1. In your Project File browser, Right-Click folder.
  2. On Popup Menu, Left-Click "Rename"
  3. Copy folder name with shortcut key, Ctrl + C
  4. On your code editor side, SELECT any piece of code with mouse drag. (Do not click with mouse in code editor first. MUST do SELECTION from beggining.)
  5. Then Paste Ctrl + V.

Nothing happens. I expect VSCode to paste/replace the selected code.

@Tyriar
Copy link
Member

Tyriar commented Feb 9, 2017

The issue appears to be that the editor doesn't correctly get focus when going from renaming in the explorer to clicking on the editor. The focus appears to change but the cursor doesn't appear.

@Tyriar Tyriar added the editor label Feb 9, 2017
@rebornix rebornix added the bug Issue identified by VS Code Team member as probable bug label Apr 21, 2017
@rebornix rebornix added the editor-clipboard Editor clipboard issues label Jun 7, 2017
@rebornix rebornix removed editor editor-clipboard Editor clipboard issues labels Aug 17, 2017
@rebornix
Copy link
Member

Looked into the code and played with it for a while. Rename->Enter will set input to the editor again then the editor is focused. However if you Rename, do nothing on the tree (no keystrokes as well) and then select text in the editor, the focus goes to editor correctly, but when the Rename Input box gets cancelled, it re-focuses the file tree item and the editor loses focus.

You can verify this by adding console.log('editor focus') at https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/browser/parts/editor/editorPart.ts#L499 and console.log('editor blur') at https://github.com/Microsoft/vscode/blob/master/src/vs/editor/contrib/suggest/browser/suggestWidget.ts#L462, then you can see editor focus -> editor blur in sequence. You can also reproduce this with Integrated Terminal: rename -> select text in terminal -> type/paste does nothing.

A proper fix is stop re-focusing the tree item if users already focus on other UI components, now it needs your insights of treeview/file explorer @bpasero @Tyriar

@rebornix rebornix assigned bpasero and unassigned rebornix and alexdima Aug 17, 2017
@bpasero bpasero added this to the August 2017 milestone Aug 17, 2017
@sandy081 sandy081 added the verified Verification succeeded label Aug 30, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants