pulsar-edit / pulsar

A Community-led Hyper-Hackable Text Editor
https://pulsar-edit.dev
Other
3.3k stars 138 forks source link

Ctrl+Shift+V results in CRLF line ending #571

Open icecream17 opened 1 year ago

icecream17 commented 1 year ago

Thanks in advance for your bug report!

What happened?

When I (paste without reformatting) LF changes to CRLF

This is probably caused by https://github.com/atom/atom/pull/19016

Pulsar version

1.105.2023052201

Which OS does this happen on?

🪟 Windows

OS details

microsoft windows 10 pro

Which CPU architecture are you running this on?

64-bit(x86_64)

What steps are needed to reproduce this?

  1. Open a file with LF endings
  2. Copy a line with a LF ending
  3. Paste without reformatting (ctrl+shift+v)
  4. There is now a CRLF

Additional Information:

As seen in the video, in the package "line-ending-selector", "default line ending" has been set to LF and the file itself is also LF

Video of repro: https://github.com/pulsar-edit/pulsar/assets/58114641/1b78db86-1870-4b6a-a3cf-df52ff413ddb

confused-Techie commented 1 year ago

Thanks for the report and video. Very interesting behavior indeed, makes me wonder why it's reformatting your clipboard text at all really, if you are not asking it to.

icecream17 commented 1 year ago

It's definitely caused by https://github.com/atom/atom/pull/19016/files, though I'm not sure how to differentiate between ctrl+v and ctrl+shift+v here.

Additionally, I wonder if instead of format paste: convert to OS line ending, it should be format paste: convert to File line ending. But this would make atom-core depend on the line-ending-selector package.