Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cut/Paste doesn't behave as Copy/Paste without selection #5039

Closed
chuanliwen opened this issue Oct 19, 2023 · 8 comments
Closed

Cut/Paste doesn't behave as Copy/Paste without selection #5039

chuanliwen opened this issue Oct 19, 2023 · 8 comments

Comments

@chuanliwen
Copy link

Use Ctrl+X to cut without selection (that is to cut the whole line) and then paste, the text is inserted into the current line at the cursor position. Using Ctrl-C to copy the whole line and paste, the whole line is inserted before the current line. I think Cut the whole line should behave as Copy the whole line. Please see if this is an issue. Thank you!

@hpwamr
Copy link
Collaborator

hpwamr commented Oct 19, 2023

Hello @RaiKoHoff , Yes, I can reproduce it. 😬

@RaiKoHoff
Copy link
Collaborator

This is exactly the behavior of VisualStudio Editor (and VSCode using VS Keymap extension) and the developer are used to it, so this will not change.
Further readings: discussion of issues #32 and #1657.

If you don't like the copy/cut on empty selection, you can switch it off:

[Settings2]
NoCopyLineOnEmptySelection=true
NoCutLineOnEmptySelection=true

@chuanliwen
Copy link
Author

Got it and know this is the design. I like the feature of copy/cut on empty selection and use them frequently to delete/copy lines. Thanks again.

@hpwamr hpwamr reopened this Oct 20, 2023
@hpwamr
Copy link
Collaborator

hpwamr commented Oct 20, 2023

This is exactly the behavior of VisualStudio Editor (and VSCode using VS Keymap extension) and the developer are used to it, so this will not change.

Hello @RaiKoHoff ,
With reason @chuanliwen has pointed a difference between the behavior of Ctrl+X and Ctrl+C on Empty selection! 🤔

I've tested the behavior of Ctrl+X and Ctrl+C on empty selection with Notepad3 and with MS VSCode.

Tests of Ctrl+C done with Notepad3 and MS VSCode:

Ctrl+V has an exactly same behavior: 👍

  • Hit Ctrl+C on empty selection
  • Now put the cursor in middle of a line and hit Ctrl+V
    • Copied text is inserted on a New line above of the cursor's line for both applications

Tests of Ctrl+X done with Notepad3 and MS VSCode :

Ctrl+V has a different behavior 👎

  • Hit Ctrl+X on empty selection
  • Now put the cursor in middle of a line and hit Ctrl+V
    • Cut text is inserted on a New line above of the cursor's line for MS VSCode
    • Cut text is inserted After the Cursor location for Notepad3 😬

@RaiKoHoff
Copy link
Collaborator

@hpwamr : You are right.

@RaiKoHoff
Copy link
Collaborator

Also line-cutting and paste behavior of Ctrl+Shift+X (Non Visual Studio style) should have been fixed with PR #5042 now.

@hpwamr
Copy link
Collaborator

hpwamr commented Oct 20, 2023

Hello @chuanliwen ,

Feel free to test the "BETA/RC PortableApps", version "Notepad3Portable_6.23.1020.1_rc.paf" or newer, see in issue #1129.

"Notepad3Portable BETA/RC PortableApps" version can be used with or without ".7z" extension.

Also, feel free to test the "BETA/RC Setup", version "Notepad3_6.23.1020.1_rc_Setup" or newer, see the 2nd list in issue #1129.

Comments and suggestions are welcome... 😃

@chuanliwen
Copy link
Author

hi @hpwamr:
Have downloaded and tested 6.23.1020.1. It's ok.
Cut the whole line (Ctrl+X) and Paste behaves as copy the whole line (Ctrl+C) and Paste: the cut line is inserted ahead of the current line as a new line.
Ctrl+Shift+X and Ctrl+Shift+C then Paste: the cut/copied line is inserted at the current position with a CR/LF mark.
I like this way, it's a good and considerate improvement.
Thanks a lot.

@hpwamr hpwamr closed this as completed Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants