andreikop / enki

A text editor for programmers
http://enki-editor.org
GNU General Public License v2.0
161 stars 38 forks source link

In Windows, files saved by Enki get incorrect line endings. #77

Closed vi closed 11 years ago

vi commented 11 years ago

Just opening and re-saving file changes it.

Saving the file in "LF: Unix" mode leads to \r\n. Saving the file in "CR+LF: Windows" mode leads to \r\r\n.

andreikop commented 11 years ago

I commited a fix, but I don't have Windows. Could you please test it. There are 2 cases:

  1. Save file in editor
  2. Use Replace in directory functionality for file, which is NOT opened now

Is current EOL mode autodetected correctly on Windows when Enki opens file?

vi commented 11 years ago

Trying Enki 12.08.5 (1aed2afed919) running in ActiveState Python on Windows XP SP3: looks like the same: \r\n in Linux mode, \r\r\n in Windows mode. A file with \r\n detected as Linux...

If I do "bin/enki" in the Enki's GIt repository, is it certain that I will run the Git version, not installed/cached/whatever one?

andreikop commented 11 years ago

This is old version. What about current master?

On Mon, Apr 8, 2013 at 4:35 PM, Vitaly Shukela notifications@github.comwrote:

Trying Enki 12.08.5 (1aed2afhttps://github.com/hlamer/enki/commit/1aed2afed919) running in ActiveState Python on Windows XP SP3: looks like the same: \r\n in Linux mode, \r\r\n in Windows mode. A file with \r\n detected as Linux...

— Reply to this email directly or view it on GitHubhttps://github.com/hlamer/enki/issues/77#issuecomment-16050504 .

vi commented 11 years ago

Checked 853474d22: works. Line endings style is detected automatically correctly on Windows.

andreikop commented 11 years ago

I released this fix as v12.10.3