npp v8.6 reverses the order of lines on column copy/paste
-
@Theo-Pavloudis said in npp v8.6 reverses the order of lines on column copy/paste:
@Alan-Kilborn @mkupper it’s still there in 8.6.8 either with Column Selection to Multi-Editing on or off.
This was fixed in 8.6.9 (item 13 in the announcement).
-
I am having the same problem. I tried with versions v8.8.3 and v8.7.7, can somebody else reproduce this?
-
@notdodgeball said in npp v8.6 reverses the order of lines on column copy/paste:
I am having the same problem. I tried with versions v8.8.3 and v8.7.7, can somebody else reproduce this?
Yes. However, it is not a bug, but a “feature.”
Column selections are expected to retain their physical order regardless of the direction in which they were selected. That’s what the earlier part of this thread concerned.
You made a zero-width column selection, but then (I think) you pressed Shift+End. That converted the column selection to a multiple selection. You can see that because the carets at the end of each line are not lined up. A column selection would be a rectangle that included the empty space at the end of shorter lines and had all the flashing carets lined up.
Multiple selections regard the order in which the selections were made. Even though you started as a column selection, the fact that you started at the bottom and extended to the top is “remembered” when you change it to a multiple selection. So the bottom line is “first,” and that’s how it’s pasted.
If you wanted to extend your zero-width column selection to the right, you would have had to use Alt+Shift+right arrow until you got it as wide as desired (or just make the original selection by doing a click at one corner and an Alt+Shift+click at the diagonally opposite corner).
-
Further to what @Coises said (regarding “(I think) you pressed Shift+End. That converted the column selection to a multiple selection”), turning off the Settings > Preferences > Editing 2 > ☐ Enable Column Selection to Multi-Editing would have prevented that switch from Column mode to Multi-Edit mode. That would have made it more obvious.
Even with that option enabled, there are ways to fix it:
- Like @Coises said, use
Alt+Shift+RightArrow
to extend to the right - You could also use
Alt+Shift+End
instead ofShift+End
, which would extend the selection to the end of the active line’s width, but keep it a column (rectangle); you could then useAlt+Shift+RightArrow
to finish extending it if the active line wasn’t the widest line.
Here’s a screen recording of me using the keyboard (even for the initial column selection) to do all that. Hopefully, you can follow along with my notes in the recording to understand it. (Recorded in v8.7.7, because I had gone back there to verify the option existed in the older version you listed.)
Unlike @Coises , I don’t consider it a “feature” (ie, a bug masquerading as a feature), I think it’s a reasonable compromise between all the different opinions on what the “right” behavior should be when mixing between column and multi-select mode.
- Like @Coises said, use
-
@PeterJones said in npp v8.6 reverses the order of lines on column copy/paste:
Unlike @Coises , I don’t consider it a “feature” (ie, a bug masquerading as a feature), I think it’s a reasonable compromise between all the different opinions on what the “right” behavior should be when mixing between column and multi-select mode.
I agree — perhaps the scare quotes were a bit excessive. For certain, it’s intended behavior; it was never a bug that was presented as a feature to avoid dealing with it.
I think that for users like me, who use rectangular selections frequently and multiple selections rarely, the improvements to multiple selection in the early 8.x releases felt like a degradation in user experience. Some of that has been mitigated by the Multi-Editing options (though, for example, turning off the ability to create multiple selections when you do want them is an unfortunate trade-off for not breaking normal drag-copy conventions… but if I recall correctly, that binary choice is baked into Scintilla, so it would be fragile at best for Notepad++ to attempt something different).
I imagine it appears exactly reversed to people who use multiple selections often and rarely want rectangular selections: they probably wish the distinction could be eliminated so they didn’t have to keep track of different behaviors when a rectangular selection hasn’t been changed to a multiple selection.