Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copying doesn't work #14

Closed
phraemer opened this issue Oct 29, 2015 · 7 comments
Closed

Copying doesn't work #14

phraemer opened this issue Oct 29, 2015 · 7 comments

Comments

@phraemer
Copy link

Hi,

If I record a macro where for example I select a word with ctrl+w and then copy it, move and then paste, on subsequent playback it pastes the same text as was copied when recording. Expected is to perform the copy upon every playback.

Thanks,
James

@xps
Copy link
Owner

xps commented Nov 16, 2015

Hi, and thanks for reporting this. However, I can't really reproduce the problem. For me copying and pasting seem to be behaving just as expected. Here's what I've used for testing. Could you please try this and let me know if you get a different result? Maybe it has to do with the Visual Studio version or something.

I started with this text file:

A
B
C
D

Then I placed my cursor before the A. Pressed Ctrl+Shift+R to start recording. Then Shift+Right to select the A, Ctrl+C to copy, Right to move the cursor out of the selection, Ctrl+V to paste. Finally, Down and Left to move to the next line, and Ctrl+Shift+R to end the recording.

I now have AA on the first line. I repeat the macro by pressing Ctrl+Shift+P 3 times and I end up with:

AA
BB
CC
DD

@phraemer
Copy link
Author

Hi,

Thanks for getting back to me.
I tried your example and that worked.
Then I tried a more complicated example in some c++ code and sometimes at the point it pasted it resulted in an empty paste. It seems like the bug I am experiencing is somewhat context dependent and not consistent.

I'm using Visual Studio 2013 Update 5
I'll keep trying and see if I can come up with a simple example where it doesn't work.
I'll also check if any other add on is interfering.

thanks,
James

@ericvana
Copy link

Hi,

The Copy recording doesn't seem to work for me as well.
Also, the above example does not work.
I will try to do some debugging when I have time.

Edit:
For me, the problem was another extention: Productivity Power Tools 2015 for Visual Studio 2015
In particular the "HTML Copy" option. When disabled, the Macro recording works fine.
Using ILspy I could find that at least for the Copy and Cut actions, it doesn't call the next IOleCommandTarget returned by IVsTextView.AddCommandFilter.
In this case I dont think the VSTextMacros extention can do anything about it...

Kind regards,
Eric

@loicmorvan
Copy link

Hi!

Tested by deactivating HTML Copy on my ProPowerTools2015 extension.
And you know what? It works!

Thanks for the tip,
Loïc

@xps
Copy link
Owner

xps commented Jun 5, 2016

I will close this as resolved, as it seems confirmed that the issue was caused by the Productivity Power Tools 2015 extension. Will reopen if someone can provide a repro not involving the extension.

@xps xps closed this as completed Jun 5, 2016
@ygoe
Copy link
Contributor

ygoe commented Apr 21, 2017

Might be worth adding this info in the README because the PPT extension is fairly common, and it enables all its options by default (and sometimes even on a silent update). Only VS 2017 has this "resolved" by splitting PPT into separate extensions you need to install explicitly.

@PaltryProgrammer
Copy link

greetings kind regards
attached please find GIF demonstrate copy to clipboard then paste fails . please note aforementioned PPT "Copy As HIML" is installed but not enabled .
thank you kindly
Clipboard Failure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants