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

Paste via terminal.integrated.rightClickCopyPaste doesn't work anymore in the integrated terminal #28516

Closed
warpdesign opened this issue Jun 12, 2017 · 19 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug terminal Integrated terminal issues verified Verification succeeded
Milestone

Comments

@warpdesign
Copy link
Contributor

warpdesign commented Jun 12, 2017

  • VSCode Version: 1.14.0-insider 1cc8f3...
  • OS Version: Windows 64 bit (insider 16215)
  • cmd.exe used for the integrated terminal

Steps to Reproduce:

  1. open an existing file and select + copy some text
  2. open the built in terminal & right click in it

What happens?
Nothing happens: nothing is pasted. And the clipboard seems to be empty

What should happen?
Text should be pasted and kept in the clipboard.

Note: selecting & copying some text inside the terminal div and then pasting it inside the terminal seems to work. But if it's copied outside of the terminal div, it doesn't work.

@vscodebot vscodebot bot added the insiders label Jun 12, 2017
@ramya-rao-a ramya-rao-a added the terminal Integrated terminal issues label Jun 12, 2017
@ramya-rao-a ramya-rao-a added this to the June 2017 milestone Jun 12, 2017
@Tyriar
Copy link
Member

Tyriar commented Jun 12, 2017

Certainly related to the massive changes with selection that just landed #9958, will look into it soon.

@Tyriar
Copy link
Member

Tyriar commented Jun 12, 2017

Did you have a selection in the terminal beforehand? If so this is by design, at least at the time of implementation. One of the perks of this new selection implementation is that the selection doesn't disappear whenever the terminal loses focus, so the right click you may be expecting to paste may be doing a copy using the existing selection?

@Tyriar Tyriar added the info-needed Issue requires more information from poster label Jun 12, 2017
@warpdesign
Copy link
Contributor Author

warpdesign commented Jun 12, 2017 via email

@Tyriar
Copy link
Member

Tyriar commented Jun 12, 2017

@warpdesign are you sure? The selections aren't visible currently unless you have a theme that sets selection.background (#28554).

If not some follow ups:

  • Any errors in devtools console?
  • What's in your settings.json file?
  • Where are you right clicking exactly (on selection, outside selection, outside viewport)?

@warpdesign
Copy link
Contributor Author

@Tyriar I'll try to make a video. No errors in devtools console.

@warpdesign
Copy link
Contributor Author

warpdesign commented Jun 12, 2017

Here is a video (the skin I use supports selection in the terminal).

vscodepaste

Each time the cursor turns into an arrow pointer is when I am pressing right mouse button.

@warpdesign
Copy link
Contributor Author

Here is my user settings file:

{
    "window.zoomLevel": 0,
    "terminal.integrated.cursorStyle": "line",
    "terminal.integrated.cursorBlinking": true,
    "workbench.colorTheme": "Dracula",
    "workbench.iconTheme": "vscode-icons",
    "editor.minimap.enabled": true,
    "window.openFilesInNewWindow": "off",
    "terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\cmd.exe",
    "editor.cursorStyle": "line-thin",
    "workbench.statusBar.visible": true,
    "window.menuBarVisibility": "default",
    "workbench.activityBar.visible": true
}

And my workspace settings json:

// Place your settings in this file to overwrite default and user settings.
{
	"javascript.validate.enable": true,  
  "jshint.enable": false,
  "jshint.options": {
    "esversion": 6,
    "esnext": true
  },
	"editor.insertSpaces": true,
	"editor.tabSize": 4,
    "files.exclude": {
        "**/.git": true,
        "**/.svn": true,
        "**/.hg": true,
        "**/.DS_Store": true,
        "**/.happypack": true
    }    
}

@Tyriar
Copy link
Member

Tyriar commented Jun 12, 2017

@warpdesign very helpful thanks. While I look into this again you should fix up the spaces and tabs in your workspace settings.json 😉

@warpdesign
Copy link
Contributor Author

@Tyriar glad it helps. You're right, I'll fix it ;)

@Tyriar
Copy link
Member

Tyriar commented Jun 12, 2017

Can't repro using regular cmd.exe, how does clink get launched?

@warpdesign
Copy link
Contributor Author

I installed it using the installer here: clink installer. No idea how it gets launched.

But I uninstalled it and still get the same bug.

@warpdesign
Copy link
Contributor Author

warpdesign commented Jun 12, 2017

Hmm.. it might be related to the Windows console: opening an external cmd prompt, right-clicking on the title bar, choosing "default" and checking use legacy console seems to fix the problem after restarting Code.

Note that on an external cmd prompt, right-click to paste works, no matter if use legacy console is set or not.

Edit doesn't seem to be related after all :/ I guess I need some sleep, enough tests for now ;)

@Tyriar
Copy link
Member

Tyriar commented Jun 12, 2017

Interesting... So I don't have legacy console enabled and it works just fine in VS Code.

Would you be able to debug into TerminalPanel.ts here and see if it's hit?

image

@warpdesign
Copy link
Contributor Author

warpdesign commented Jun 13, 2017

@Tyriar It's a hit:

vscodebreakpoint

@warpdesign
Copy link
Contributor Author

warpdesign commented Jun 15, 2017

I think I found the problem: I tried disabling my extensions one by one and it seems documentThis is the guilty one: if I disable it, right-click to paste works as expected.

I wonder what it does than can break this functionnality.

@Tyriar
Copy link
Member

Tyriar commented Jun 16, 2017

@warpdesign very strange, that extension seems to have nothing to do with the terminal. So after installing it against you see the issue occur? Did you try to step through the code and see which path it takes? Was it always going through the clearSelection() route for example?

@jens1o
Copy link
Contributor

jens1o commented Jun 16, 2017

I experienced the same issue on Windows. After an Windows update and an Insiders update, it didn't worked anymore. But since then Ctrl + V(Paste) works fine.

@Tyriar
Copy link
Member

Tyriar commented Jun 22, 2017

I think this was caused by the bug in Terminal.hasSelection xtermjs/xterm.js#725

@Tyriar Tyriar closed this as completed Jun 22, 2017
@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Jun 22, 2017
@Tyriar Tyriar changed the title Paste doesn't work anymore in the built-in terminal (Windows 10) Paste via terminal.integrated.rightClickCopyPaste doesn't work anymore in the integrated terminal Jun 22, 2017
@Tyriar
Copy link
Member

Tyriar commented Jun 22, 2017

To verifier: Any OS should do, as long as terminal.integrated.rightClickCopyPaste is set to true.

@michelkaporin michelkaporin added the verified Verification succeeded label Jun 29, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 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 terminal Integrated terminal issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants