Sublime Forum

Problem/bug with multi-line multi-select copy & paste

#1

Hi,

I found, what I consider to be, a bug in sublime text 2. This is a bit hard to put in words, so look at the following images:

Selecting some text with multiple carets:


Selecting somewhere to insert the text:

Pasting. We can see the “correct behavior”:

Selecting and copying multiple lines per caret (this case, 4 lines per caret):

Moving carets to position for paste:

Pasting:

In the last image you can see that all carets get all of the clipboard, basically resulting in “wrong behavior” in my mind. I would have liked it to paste only the text that is related to the one caret like we see in the first example with correct behavior. Hopefully this is a simple fix.

Cheers

PS.: I can see that the images are fairly large and are getting cropped. Open them in a new tab to see the entire thing (text overview is gone).

0 Likes

#2

This problem has existed since the very beginning, and frustrates me on a pretty regular basis. Any chance this will get fixed?

0 Likes

#3

+1

I just ran into this as well.

0 Likes

#4

@Cort3z etc.

Yes, multi-caret/multi-select copy/paste intelligence seems to break down when any of the selections span more than one line. It would be very nice to see this fixed; in the past I’ve been tripped up by this without realising why, now especially I’d like to see it fixed!

I think this can be done intelligently. So long as the number of carets == number of copied selections, paste should be handled intelligently by pasting each selection to each caret in order. If carets != copied selections, paste everything to every caret. In the event that there are edge cases where this can’t be handled intelligently, an explicit toggle for “intelligent multiselect CnP” vs “dumb multiselect CnP”??

Perhaps the OP should put this on the issue tracker. I really hope Jon will look into some of these annoyances - I mentioned in the 3054 thread about wrapping behaviour for writing text, and the cursor movement behaviour for wrapped lines. Details like these really irk me.

Slightly offtopic, I’d love to hear Jon respond to these kinds of things now and then, even if just a one line “I’ll look into it”, “It can’t be fixed for reasons I’d rather not go into” or “It can be fixed, but it might take some time” etc… At the risk of speaking for others, such things spark frustration because we like the tool and would love to see everything working just right as well as evolving.

Totally off-topic, and just thinking out loud… If Jon’s lost the will to keep working on Sublime - a position for which, with all due respect, there might be very good reasons - here’s an idea: Decide how much he’d like to be paid to give it over to the community (ie. OSS), and set that as a target figure for a kickstarter or indiegogo campaign which, if reached, releases sublime to a community who I’m sure would be keen to proactively grow and refine the product. I’m not especially encouraging this, as I’m one of the bunch who are very happy with Sublime on the whole, but it does seem as though interest in actively developing Sublime has waned in recent months. Just throwing it out there.

0 Likes

#5

Check out github.com/adzenith/CopyEdit.

0 Likes