Reply To: (yet) Another copy/paste question

Product Compare Forums Multi-Edit Support (yet) Another copy/paste question Reply To: (yet) Another copy/paste question


The behavior of paste hasn’t actually changed much since Multi-Edit 9.x but you have probably started using another program that "extends" the capability of the Windows clipboard. I actually have the same issue here since I use a program called Desktop Rover that allows sharing the clipboard between multiple systems.

The problem is that Multi-Edit has to maintain its own clipboard buffers since Windows only supports stream blocks and Multi-Edit needs to support line and column blocks as well. Multi-Edit tracks changes to the Window’s clipboard and if another program places something in the clipboard, Windows will send a notification of the change to Multi-Edit and it sets a flag to show that the Windows clipboard has changed since a local cut/copy was done. What happens then is that, when we cut/copy a block to our internal buffer we also place it in the Windows clipboard and then set another flag to ignore the next notification from the Windows clipboard as that will be the one generated because of the data we place there. Now Desktop Rover see the update and then does something to copy the contents so that other systems see the data. This has the side effect of causing another clipboard notification to be sent and Multi-Edit see this as new clipboard content was added. Thus if the block Multi-Edit copied was a line or column block, when paste is used to paste the data, it will grab the data from the Windows clipboard, which will be a stream block and do what you see happening.

The only workaround that I’ve been able to come up with to date is to pass an additional parameter to the Paste macro to cause it to ignore the Windows clipboard check and only use our internal buffers. I have assigned the Shift+Ins key to run "Paste /WC=2" to ignore the Windows clipboard.

There are also some other "clipboard enhancement" programs that do the opposite, i.e. prevent clipboard notifications being sent to Multi-Edit and thus we had to add the "Paste Special" menu which basically runs the macro "Paste /WC=1" which always copies the contents of the Window clipboard.

I hope this explains the situation a bit. I plan to look at this code in the near future again to see if we can’t fix it but the last time try I couldn’t find a workable fix that worked for both cases.