Copy and paste in Eclipse adds window newlines at the end of each pasted line

廉价感情. 提交于 2019-12-02 23:42:37

I had exactly the same annoying problem. After some research and experimentation I think I found the source of the bug and a workaround.

Observations on my set up (Eclipse 3.7.2, PDT 3.0.0, no aptana):

  • it only occurred for me in PHP files inside the <?php ?> delimiters.
  • it only occurred when pasting while the cursor is somewhere on a line with only whitespace. After pasting, all whitespace was removed.
  • When there was a non whitespace character on the line, it did not occur. When pasting in front of the non-whitespace character, the whitespace in front of the character was however removed.

This behavior felt like an issue with automatic indentation handling, so I tried dis-/enabling indentation related options. Disabling the following option fixed it for me:

PHP > Editor > Typing > When pasting adjust indentation

good luck

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!