Click & Drag difference: Bug or "Feature?"

I’ve asked about this under Tech Support, but commented that it might be considered (IMHO) a bug. On my Mac, in a split editor viewing different parts of the same document, Clicking and Dragging from one editor to the other results in the same effect as “Copy and Paste,” NOT “Cut and Paste.” This, to me, is illogical. Since you are viewing two parts of the same document, the behavior should be the same as if you had clicked and dragged content in a non-split editor.

(I wouldn’t be surprised to hear you say that this behavior is necessary because of the functionality of a split editor. But I would appreciate it if there would be some setting that would allow the Click + Drag function to be like a Move, or Cut and Paste.)

thanks, Neil

Hi Neil,

You’re right, this functionality is just a necessary feature of the split editor, something built into the text system. Cut and paste works on a view level, not a document level, so because you are viewing the document in different views, it works as a copy. It’s certainly not a bug and doesn’t belong in the Bug Hunt forum, although I can see why you would want it to work as a cut in this instance. I’ll take a look at it, but cannot promise anything since this is something hard-wired into OS X’s text system.

All the best,
Keith

Okay, I’ve been looking at this and I’m afraid that it doesn’t look possible. The trouble is that copy, paste and drag are all handled by the OS X text system. I subclass (that is, customise), NSTextView, the main text editor class, heavily. You can only do this at given entry points, however. The problem is that the point at which you can override receiving a drag and drop doesn’t allow for much of a change in behaviour. By the time the action is passed to the text view, the selection has already changed, and there isn’t a way to distinguish between whether the action is a copy and paste or a drop. The only way to implement this change would be to override NSTextView’s drag and drop system entirely - which would mean completely re-implementing all drag and drop and copy and paste behaviour just to get this one addition. Hopefully you can understand why I don’t want to do that. :slight_smile:

I have, however, submitted an enhancement request to Apple (ID#14318510) asking them to provide extra entry points so that developers can add this behaviour in future.

All the best,
Keith

Keith
I certainly appreciate your looking into it, and I’m not surprised. I suppose I’ll have to get used to using the secondary (popup) menu that includes Cut.

Cheers -

Neil