[Geany-devel] "Ensure new line on file end" inserts new line when file is empty

Nick Treleaven nick.treleaven at xxxxx
Wed Oct 20 11:42:52 UTC 2010


On Sat, 16 Oct 2010 22:37:29 +1100
Lex Trotman <elextr at gmail.com> wrote:

> What I'm expressing badly is that if a file ends in a newline you can
> consider that there is nothing after that, or you can consider that it
> has an empty unterminated line after the newline. Similarly an empty
> file has no lines or it has one unterminated empty line.  Geany takes
> the empty unterminated line view, since a new "untitled" shows one
> line on screen.  But neither interpretation is "right", it depends on
> what you are using the file for and what the tools expect.
> 
> My argument is that, if someone (eg me) selects that I want my file to
> end in newline (which is what the preference says) then thats what it
> should do, irrespective of any interpretation or the length of the
> file.

I agree.

Nick



More information about the Devel mailing list