Forum moved here!

Home / Double paste when pasting code from a specific PDF

mercfx

Hi guys!

I’ve noticed some very strange behaviour when copying/pasting code snippets from a book I’m following. All the code is pasted twice, with trailing characters here and there. Allow me to demonstrate:

This
case 1:
blabla(bla, bla);
break;

becomes this:
case 1:
blabla(bla, bla);
1:
blabla(bla, bla);
break; ;

Ordinarily-formatted text (from both the same book and others) doesn’t trigger the issue and code snippets from other books work fine. Chrome also pastes correctly. What could be the problem?

GitHubRulesOK

Always difficult to tell without the actual pdf however its not uncommon for nested copies of text to be embedded in the background, especially after an edit. Chrome may be seeing only one or deliberately discarding the earlier edit / duplicate one

mercfx

Gotcha, thanks for the tip!