Skip to content

Conversation

@henrikvilhelmberglund
Copy link
Contributor

This pull request aims to add a feature to allow for coping a single row when no selection is available.

I always thought it was a bit annoying that Ctrl+c without a selection didn't do anything. Now it does something, it copies the entire row at once.

There is a crash if you copy a row without a selection, paste and then press delete, not sure what's going on there so I'm marking this as draft for now.

(If applicable) This pull request improves upon and supercedes #<PR number>.

Changes in this PR:

  • (cite all changes made in the PR for change log)
    • Feature (pattern editor): allow for copying single row when no selection is available

@henrikvilhelmberglund
Copy link
Contributor Author

So time to get back to this I think, what I've seen so far: (debugging this causes ctrl c and ctrl v to not do anything, very cool)

  • When pasting after copying without a selection ClipInfo.EndColumn is set to 15 which is not a real value
  • After that GetSelectColumn() is getting 32768, it should probably not be called at all since nothing is being selected
  • After that CopyNoteSection() has an end value of a few millions which then causes problems with the loop below and crashes the program.

I think I'll need to split copying with a selection and copying without a selection for things to make sense.

@henrikvilhelmberglund
Copy link
Contributor Author

Should work now, there's an assert in debug when you paste from a copy without a selection though, not too sure what to do about that.

Usage:

  • Navigate to a row
  • Press Copy (no selection needed)
  • Navigate to another row
  • Paste, the whole row from before is pasted

ft0

@henrikvilhelmberglund henrikvilhelmberglund marked this pull request as ready for review December 12, 2025 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant