atom / line-ending-selector

Switch between Unix and Window style line endings.
MIT License
33 stars 18 forks source link

No option to change line ending of a single line #55

Closed rsn8887 closed 6 years ago

rsn8887 commented 6 years ago

Prerequisites

Description

Cannot change line ending of a single line

Steps to Reproduce

  1. load a file with mixed line endings
  2. select a portion of the file
  3. click on the "mixed" button to change from LF to CRLF
  4. line endings in the whole file are changed

Expected behavior: [What you expect to happen]

Line endings should only change in the selected text. How else am I supposed to change the ending of a single line (sic)

Actual behavior: [What actually happens]

Line endings can only be changed in the whole file or nowhere

Reproduces how often: [What percentage of the time does it reproduce?]

every time

Versions

You can get this information from copy and pasting the output of atom --version and apm --version from the command line. Also, please include the OS and what version of the OS you're running.

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

Arcanemagus commented 6 years ago

Text mode files are required to use a single delimiter to show where lines end, that's why it's called the "line ending".

Atom is smart enough to be able to read files that have multiple different line endings within them, and will only touch them on lines you edit, but changing the line ending using the selector changes it for all lines in the file. That is exactly what you are asking it to do after all 😉.

If you need to insert multiple different line endings in a document you'll need to open it in something that edits the file as binary data since you are explicitly not treating it as a text mode document.