I was working on another macro, and having really weird issues with the clipboard and VS Code. So I built a very simple test macro:
If I run that using BBEdit, with this in the editor and selected:
This is BBEdit
Then here's what the clipboard looks like afterwards:
Which is exactly what I would expect. If I change the macro to run VS Code, though, with This is VS Code selected, here's what I get on the clipboard:
Duplicate entries is definitely not what I expected.
VS Code is cross platform, and it does have other oddities in the copy/paste realm—the Edit > Copy command is always enabled, even with nothing selected, for instance.
Another even worse oddity: The KM Copy action will simply time out, so you have to use the Copy item in the Edit menu (which you have to KM-Action click first, then action-click again to get Copy). But using that menu item action gets you this on the clipboard if there's no selection:
You don't get this if you use Command-C directly in VS Code with nothing selected—it just copies nothing, as you'd expect. Weird. (Well, you might expect Copy to not be enabled without a selection, but that's not the case.)
Back to the main issue: I have no idea why a Cut+Filter in VS Code causes two clipboard entires (one from the cut, and one from KM's filter). I tested on two different Macs (both running Sonoma, both on KM 11.0.2 and whatever the latest VS Code release is), and they both exhibit this issue.
Does anyone know why I'm getting double clipboard entries from VS Code? @peternlewis, this one's got me stumped. I can work around it, but would love to know why it's happening.
-rob.