Ticket #1652: autodetect line-endings
commitd1c1d6e2fb72e5600cc9ca2bc797c0b1290ebdcd
authorPaul Sokolovsky <pmiscml at gmail.com>
Thu, 20 Oct 2011 13:40:02 +0000 (20 16:40 +0300)
committerIlia Maslakov <il.smind@gmail.com>
Wed, 1 Aug 2012 12:28:24 +0000 (1 16:28 +0400)
treeb3b3fc600cfd8f49c6bff1fe34fe06df10cf859f
parent849fe8e4b1ab8f9a0e2aa3d46967fb9529f05989
Ticket #1652: autodetect line-endings

    * On opening file, detect line-endings used by sampling some initial content.
    * If it happen to be CR or CRLF, skip fast load path, and in edit_insert_file()
      convert such line endings to '\n'.
    * Save detected line ending type for editor.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
src/editor/edit-impl.h
src/editor/edit.c
src/editor/editcmd.c
src/editor/editdraw.c