-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Whole line cut/copy/paste indentation/new line issues #9130
Comments
@le717 If I understand correctly, what you're seeing is this:
This is not a regression from the pre- codemirror/codemirror5#2382 behavior. Cutting a whole line with no selection wasn't even possible before then. And if you cut a whole line manually (e.g. Ctrl+L, then Ctrl+X), you'll see the same exact behavior as I've described above. Some editors do have fancier behavior than this though:
@le717 is that the sort of behavior you're looking for here? |
@peterflynn Yes, that is what I am seeing. As for the behavior, it is mainly how the whitespace is added to any existing whitespace and the addition of the new line (disregard your third point, I was not meaning to report that, that is fine except for the whitespace addition). Having the whitespace merged so as the indentation is preserved and the trailing new killed would be my expected behavior (inserting a line above is not desired, I already have my cursor where I want the line). |
Sublime's behaviour is the correct one for me. It creates a new line, resets the indentation all the way to the left and then pastes the content, instead of pasting line and whitespace at your cursor's position. +1 for reporting this. |
@peterflynn is the current behaviour the expected one or should we match Sublime? |
I would like to add my perspective here. The main issue that's frustrating for me is there doesn't seem to be a way to cut/copy a block of text without codemirror adding an extra newline at the end. This is especially frustrating when I'm trying to paste multiple copies of a single line. I end up having to go back and manually delete an empty line for every paste I performed. Personally, I've never used or seen another editor that behaves this way, so I assumed this is a bug. But maybe this is desirable behavior in some cases? Cheers. |
Sorry, this seems to be a Safari-only bug: #2900. Guess what browser I'm using? sigh |
I'm not totally sure how to explain this, so here is a GIF showing the issue using the Getting Started project. Feel free to rename the issue for clarification.
Running Brackets 0.44 at bf9efc3 from master, also repos in 0.43 or whenever codemirror/codemirror5@12e3efe (codemirror/codemirror5#2382) was pulled in.
The text was updated successfully, but these errors were encountered: