[Geany-devel] [PATCH] Ensure convert line endings before save

Manuel Bua manuel.bua at xxxxx
Fri Jul 9 18:50:38 UTC 2010


  Sorry for reposting this message but i just realized i didn't include 
the "[PATCH]" prefix in the subject of my previous mail to this list, so 
the original text follows:

-------------------8<-------------------8<-------------------8<-------------------8< 


   Hello all,
      i already searched for this feature, in case someone else was
already working on it or if it simply was a bad idea to implement.
For now, i haven't found anything nor something against it so i
implemented this simple feature, that basically ensure no mixed line
endings control characters (le-cc) will be saved in the document, patch
is attached (i used the latest SVN head, 5089).
Let me explain the use case: i'm currently working on a project where
some of the files contains mixed line endings control characters, ie.,
some lines end with just CR, other with just LF: there is an easy way to
convert everyone of these control charaters to something else via
"Document->Set line endings->Convert and set ..." but this isn't
something i always manage to remember to do and, better, i would like
the editor to take care of that for me.
So this patch add just that: in the "Preferences->Files->Saving files"
dialog i added a  checkbox and, if checked, the editor will always
convert any le-cc to the one currently actively on the document via
sci_get_eol_mode(doc->editor->sci).
I also would like to propose a change in the way le-cc are presented to
the user, but i'll do a new post eventually.

Regards,
Manuel

-------------------8<-------------------8<-------------------8<-------------------8< 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/devel/attachments/20100709/177bc578/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ensure_convert_line_endings.patch
Type: text/x-patch
Size: 7140 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20100709/177bc578/attachment.bin>


More information about the Devel mailing list