notepad-plus-plus / notepad-plus-plus/notepad-plus-plus
[BUG] Block cut&paste from bottom invert paste result
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 29.4k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
Is there an existing issue for this?
- I have searched the existing issues
Description of the Issue
Copying block from the bottom instead from the beginning cause order inversion for rows in block when you paste.
No advice for this behavior but data can be compromised if users don't recognize this in time.
Steps To Reproduce
- Write for example 3 rows like:
01
02
03 - Position the cursor at the end of file, ON THE RIGHT of text "03"
- Press SHIFT + ALT end select block from right to left (left arrow) and to the first row at the beginning of the text (up arrow).
- when at the first row, with the cursor at the benigging of text "01", then Press CTRL+C to copy
- Move to the right, in the blank area on the right or if you prefere at the end of the file
- Press CTRL+V to paste
- See the result :-x
You will read
03
02
01
I think it's becouse notpad++ load data in clipboard from the start cursor position that become the element 1 of the array not respecting the original order of the rows in the block, inverting the data (very dangerous for data integrity).
For me it's a BUG, not a feature.
Current Behavior
Invert selection if the block copy marker start from the bottom.
Expected Behavior
I expect when i copy a block, from the begin o from the bottom, the data in the block preserve the right order of rows.
I is a wanted beahavior then a pupup with a warning can help users.
Debug Information
Not Applicable.
Anything else?
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files or tests. First reproduce the block-selection copy and paste steps in Notepad++ and trace the clipboard handling for rectangular selections; done means pasting a block copied from bottom to top preserves the original row order, with regression coverage for that case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100