pkulchenko/ZeroBraneStudio — pull request #102 by Fringale (2013-01-22 22:13:37+00:00)
Title: End-of-line related changes

Hi Paul,

I happen to switch regularly from a Windows box to a Linux one, and I've made some changes to the handling of line endings for my own convenience (and hopefully others' too):
* I fixed a small bug preventing auto-indent to work on Unix systems (CR was tested instead of LF)
* I added two new configuration settings:
* `useunixeol`
* `autoeol`

As you can guess by the names, they work quite similarly to `usetabs` / `autotabs`, but for line endings. By default `useunixeol` is not set, so the current behavior (wxStyledTextCtrl / Scintilla default) is kept: LF on Linux / MAC OS X, and CRLF on Windows.

One change may be controversial: since these two settings allow the user to meddle with line endings, I chose on file load to convert them all to whatever is the current EOL mode, to assure that no file can be ever saved with mixed line-endings. IMO, it is less serious to have a file converted unexpectedly than to silently save a file with both line endings; and it should make more sense to the end-user (and be more consistent) that ZBS always saves a file in one format or the other.

Regards,
Alexis