notepad-plus-plus / notepad-plus-plus/notepad-plus-plus

[BUG] Block cut&paste from bottom invert paste result

Open
#16,707 3 comments 0 reactions 0 assignees View on GitHub

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
  1. Write for example 3 rows like:
    01
    02
    03
  2. Position the cursor at the end of file, ON THE RIGHT of text "03"
  3. 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).
  4. when at the first row, with the cursor at the benigging of text "01", then Press CTRL+C to copy
  5. Move to the right, in the blank area on the right or if you prefere at the end of the file
  6. Press CTRL+V to paste
  7. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.