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


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.


Is it happening only with Terminal? 

Could you please try a fix supplied in this thread: - it's attached to a message by Denis Fokin 25 Mar 2016, 15:22


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.





Problem still exists after updating files.


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.


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


@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.


This issue seems to be not addressed for some environments yet:

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

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


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

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


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


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.


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.


@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.


@A Belmokadem

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


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.


@Jessewolff OMG, thanks for finding the fix!


Thank you!!! I was going crazy!!


Please sign in to leave a comment.