Pasting into the terminal in Phpstorm works some of the time.

Answered

Windows 7x64

Phpstorm 145.258

Pasting into the terminal sometimes works and sometimes doesn't.  I have had this problem with previous versions of Phpstorm and Webstorm.  If I copy a piece of text then try to paste it into the console either by right clicking and choosing paste or Ctrl-V it seems to work until I try to copy and past code in the editor then the terminal paste stops working.  It is very frustrating.  I have doubled checked that it is not a problem with my OS just by pasting the copied text into notepad.  Also this happens on any computer or reinstall that I have done.

I am using the default terminal cmd.exe.  I saw a post referring to a similar problem but with windows 10 and this problem has been around for a long time with windows 7.

Any help would be appreciated.

16 comments

Is it happening only with Terminal? 

Could you please try a fix supplied in this thread: https://youtrack.jetbrains.com/issue/IDEA-143603 - it's attached to a message by Denis Fokin 25 Mar 2016, 15:22

0

Thank you that seems to be the same problem, I have applied the patch and will let you know if I have any further problems.

 

Thanks,

Dan

0

Problem still exists after updating files.

0

I experience the issue consistently on Mac OS and it freaks me out that my super IDE is not able to copy/paste few words.

0

Please record a screencast showing your exact actions and the result, maybe it'll shed some light.

0

@Eugene it happens time to time, but the actions are very simple:

  1. I use latest Webstorm;
  2. I copy some short text (let's say an NPM package name) from the Chrome browser or Webstorm editor using Cmd+C;
  3. I paste the text into the Webstorm Terminal using Cmd+V and it pastes a new line symbol instead;

I have to repeat point 2 and 3 multiple times to get expected text pasted in the terminal.

0

This issue seems to be not addressed for some environments yet: https://youtrack.jetbrains.com/issue/IDEA-168006

1) what shell path do you have specified in Preferences | Tools | Terminal?

2) what keyboard layout are you using (ABC/En/etc...)?

0

@Dmitry Yes, this issue looks exactly the same as mine.

I'm using zsh and ABC keyboard layout on MacOS.

0

Please check how would it work with /bin/bash as a shell path

0

On macOS I also have trouble pasting into the terminal. Apon pasting in the terminal no text will be inserted but it does seem to place an enter. I then have to click in the terminal so the cursor will be blinking, then I press cmd+c in the terminal. After that I copy the string again and I can paste it in the terminal.

0

Is it possible that there's actually a line break in the pasted line? Could you please check that by pasting in Editor or somewhere?
Also try disabling Settings | Tools | Terminal | Copy on selection, as it may (unexpectedly) copy the line break.

1

@Eugene can this functionality be disabled by default (Copy on selection)? This "bug/feature" has haunted me for over a year now. I'm glad it is over.

0

@A Belmokadem

You can disable this for all new projects via File > Default Settings or File > Settings for New Projects in 2018.2 EAP.

0

Disabling Copy on selection fixes it.

I would recommend making this feature opt-in in your products or fixing the issue. This has lead to a lot of copy/paste confusion/frustration for me in PyCharm, RubyMine, Webstorm. It happens when you copy/paste from an outside application. If you don't click exactly on the cursor before you paste it will copy in a new line.

0

@Jessewolff OMG, thanks for finding the fix!

0

Thank you!!! I was going crazy!!

0

Please sign in to leave a comment.