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

paste of text followed by linebreak pre-inserts rather than post-inserts #718

Closed
compwron opened this issue Mar 12, 2015 · 9 comments
Closed
Labels

Comments

@compwron
Copy link

So if I have foo\n in a paste buffer and I try to paste into

a aa aaa
b bb bbb

between aa and aaa, I would expect to get

a aa foo
aaa
b bb bbb

but instead I get

foo
a aa aaa
b bb bbb

Sublime version info:
Stable channel, build 3065

@FichteFoll
Copy link
Collaborator

Works for me.

However, I get your second result when I copied the entire line without selection, that is I just had the caret in a line with foo and pressed ctrl+c or x. It's interesting that ST differentiates between these cases, but it made me realize that I've used that feature quite a few times and would not like to see it go.

What do you think?

@compwron
Copy link
Author

Agreed that the latter case is useful. I use it too.

@FichteFoll
Copy link
Collaborator

So, is the latter what you did in the test case?

If that's the case, is this a non-issue?

@compwron
Copy link
Author

Uhhh I guess I don't understand the latter case. As far as I know it is different than what I did in the test case. I thought that you meant that pasting foo\n onto its own line would result in an empty line after foo and I agree that preserving the trailing linebreak in a paste is useful.

@FichteFoll
Copy link
Collaborator

With selection:
718_1

Without selection:
718_2

@compwron
Copy link
Author

Nice gifs! This makes it very clear.
To me, "With selection" looks useful and "Without selection" looks like a bug. Of course it is up to the maintainer to decide. :)

@FichteFoll
Copy link
Collaborator

Without selection is a useful feature that I personally don't want to miss. If anything, this could be made a setting.

Speaking of setting, you can define a keybinding and record a macro to override the "without selection" feature by selecting (ctrl+l) and then copying or cutting the line (which is now selected).

@compwron
Copy link
Author

Awesome, thanks :)

@BenjaminSchaaf
Copy link
Member

This is intended behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants