Page 1 of 3

Formating Problem after Copy / Paste

PostPosted: May 8th, 2018, 1:26 pm
by Daniel Essl
Hello

I have a strange problem with the new version.

I have Code with formating PHP like.
When I paste one word or variable or line the code move completly on the right side.

I have attached a File you can see.

Can anyone help?

Thanks

Re: Formating Problem after Copy / Paste

PostPosted: May 8th, 2018, 8:29 pm
by SoundBlstr
This also just started happening for me. I had just updated to the latest version of Visual Studio Community 15.7.0. This behavior doesn't happen for JS or CSS files, just PHP files.

I'm not 100%, but it seems like it removes all tabs and line breaks if you paste code that doesn't require being properly auto-formatted.

So, if I copy a sloppily formatted function and paste it, it works and autoformats correctly into proper tabbing, etc. But if I then copy that properly formatted function and paste it again, all the linebreaks and tabs are removed from the entire document.

Very annoying, for sure.

Unchecking all the Formatting options under Options > Text Editor > PHP > Formatting > General doesn't fix the issue. In fact, it seems to make it worse, in that now every paste removes the line breaks, even pastes that include sloppily formatted code.

Re: Formating Problem after Copy / Paste

PostPosted: May 9th, 2018, 2:59 am
by mindmagic
我遇到了相同的问题,希望可以尽快解决,这个问题十分影响工作效率
必须升级至最新版的vs2017(15.7)才会导致这个问题,这个问题与phptools的版本无关

Re: Formating Problem after Copy / Paste

PostPosted: May 9th, 2018, 6:11 am
by Daniel Essl
BugFix from Microsoft width Update 15.7.1 on 09.05.2018

Copy / Paste works correctly again.

Re: Formating Problem after Copy / Paste

PostPosted: May 9th, 2018, 7:11 am
by winnet
Daniel Essl wrote:BugFix from Microsoft width Update 15.7.1 on 09.05.2018

Copy / Paste works correctly again.


I can confirm that the Update 15.7.1 does not fix that problem.

Re: Formating Problem after Copy / Paste

PostPosted: May 9th, 2018, 9:41 am
by mindmagic
SoundBlstr wrote:This also just started happening for me. I had just updated to the latest version of Visual Studio Community 15.7.0. This behavior doesn't happen for JS or CSS files, just PHP files.

I'm not 100%, but it seems like it removes all tabs and line breaks if you paste code that doesn't require being properly auto-formatted.

So, if I copy a sloppily formatted function and paste it, it works and autoformats correctly into proper tabbing, etc. But if I then copy that properly formatted function and paste it again, all the linebreaks and tabs are removed from the entire document.

Very annoying, for sure.

Unchecking all the Formatting options under Options > Text Editor > PHP > Formatting > General doesn't fix the issue. In fact, it seems to make it worse, in that now every paste removes the line breaks, even pastes that include sloppily formatted code.


将[设置]->[文本编辑器]->[HTML]->[高级]->[粘贴时设置格式]设置为FALSE可以暂时避免这个问题

Re: Formating Problem after Copy / Paste

PostPosted: May 9th, 2018, 1:36 pm
by SoundBlstr
Microsoft Update 15.7.1 on 09.05.2018 also did not fix the issue for me.

However, mindmagic's workaround worked for me until an actual fix happens:

Tools -> Options -> Text Editor -> HTML -> Advanced -> Set [Format on paste] to FALSE

Re: Formating Problem after Copy / Paste

PostPosted: May 9th, 2018, 2:07 pm
by Miloslav Beno
Hi,

Thanks for reporting this.

I can confirm it's caused by the recent VS update. We're analysing this and preparing the patch.

For now mindmagic workaround works. Thanks for sharing!

Thank you guys, I will ping you once we have the patch ready.

Cheers!

Re: Formating Problem after Copy / Paste

PostPosted: May 11th, 2018, 7:52 am
by Daniel Essl
Daniel Essl wrote:BugFix from Microsoft width Update 15.7.1 on 09.05.2018

Copy / Paste works correctly again.


Sorry, It is not true. This Update does not Fix the problem.

Re: Formating Problem after Copy / Paste

PostPosted: May 14th, 2018, 8:46 am
by Miloslav Beno
Hi guys,

Please try the latest release. We've included the fix for the formatting issue. https://www.devsense.com/download

Please let us know if that fixed it for you.

Thanks!