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

2010-10-22 Thread Lex Trotman
On 22 October 2010 19:20, Eugene Arshinov earshi...@gmail.com wrote: On Wed, 20 Oct 2010 12:42:52 +0100% Nick Treleaven nick.trelea...@btinternet.com wrote: On Sat, 16 Oct 2010 22:37:29 +1100 Lex Trotman ele...@gmail.com wrote: What I'm expressing badly is that if a file ends in a newline

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

2010-10-20 Thread Nick Treleaven
On Sat, 16 Oct 2010 22:37:29 +1100 Lex Trotman ele...@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

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

2010-10-16 Thread Eugene Arshinov
I think it's a bug. I didn't notice it before as I usually use addons plugin with Strip trailing blank lines option checked. Patch attached, also modified to use utils_get_eol_char(). Best regards, Eugene.diff --git a/src/editor.c b/src/editor.c index a012f7d..7e01edc 100644 --- a/src/editor.c

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

2010-10-16 Thread Lex Trotman
Hi Eugene, I'm not sure it is a bug, the pref setting is there is to ensure that the file ends in a newline, so an empty file will become just a new line (see od below). Thats working correctly AFAICT. l...@fred5 ~ $ od untitled 000 12 001 Cheers Lex On 16 October 2010 17:19,

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

2010-10-16 Thread Eugene Arshinov
On Sat, 16 Oct 2010 17:49:27 +1100% Lex Trotman ele...@gmail.com wrote: Hi Eugene, I'm not sure it is a bug, the pref setting is there is to ensure that the file ends in a newline, so an empty file will become just a new line (see od below). Thats working correctly AFAICT. l...@fred5 ~

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

2010-10-16 Thread Lex Trotman
On 16 October 2010 19:52, Eugene Arshinov earshi...@gmail.com wrote: On Sat, 16 Oct 2010 17:49:27 +1100% Lex Trotman ele...@gmail.com wrote: Hi Eugene, I'm not sure it is a bug, the pref setting is there is to ensure that the file ends in a newline, so an empty file will become just a new

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

2010-10-16 Thread Eugene Arshinov
On Sat, 16 Oct 2010 21:06:12 +1100% Lex Trotman ele...@gmail.com wrote: On 16 October 2010 19:52, Eugene Arshinov earshi...@gmail.com wrote: On Sat, 16 Oct 2010 17:49:27 +1100% Lex Trotman ele...@gmail.com wrote: Hi Eugene, I'm not sure it is a bug, the pref setting is there is to

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

2010-10-16 Thread Lex Trotman
On 16 October 2010 21:39, Eugene Arshinov earshi...@gmail.com wrote: On Sat, 16 Oct 2010 21:06:12 +1100% Lex Trotman ele...@gmail.com wrote: On 16 October 2010 19:52, Eugene Arshinov earshi...@gmail.com wrote: On Sat, 16 Oct 2010 17:49:27 +1100% Lex Trotman ele...@gmail.com wrote: Hi

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

2010-10-16 Thread Eugene Arshinov
Oh God, I left an erroneous check in the code. Updated patch attacked.diff --git a/src/editor.c b/src/editor.c index a012f7d..8697c09 100644 --- a/src/editor.c +++ b/src/editor.c @@ -4609,26 +4609,12 @@ void editor_strip_trailing_spaces(GeanyEditor *editor) void

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

2010-10-16 Thread Eugene Arshinov
On Sat, 16 Oct 2010 15:05:01 +0400 Eugene Arshinov earshi...@gmail.com wrote: Oh God, I left an erroneous check in the code. Updated patch attacked. I meant attached... ___ Geany-devel mailing list Geany-devel@uvena.de

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

2010-10-16 Thread Eugene Arshinov
On Sat, 16 Oct 2010 22:04:33 +1100% Lex Trotman ele...@gmail.com wrote: On 16 October 2010 21:39, Eugene Arshinov earshi...@gmail.com wrote: On Sat, 16 Oct 2010 21:06:12 +1100% Lex Trotman ele...@gmail.com wrote: On 16 October 2010 19:52, Eugene Arshinov earshi...@gmail.com wrote:

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

2010-10-16 Thread Lex Trotman
On 16 October 2010 22:11, Eugene Arshinov earshi...@gmail.com wrote: On Sat, 16 Oct 2010 22:04:33 +1100% Lex Trotman ele...@gmail.com wrote: On 16 October 2010 21:39, Eugene Arshinov earshi...@gmail.com wrote: On Sat, 16 Oct 2010 21:06:12 +1100% Lex Trotman ele...@gmail.com wrote: On

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

2010-10-16 Thread Eugene Arshinov
On Sat, 16 Oct 2010 22:37:29 +1100% Lex Trotman ele...@gmail.com wrote: On 16 October 2010 22:11, Eugene Arshinov earshi...@gmail.com wrote: On Sat, 16 Oct 2010 22:04:33 +1100% Lex Trotman ele...@gmail.com wrote: On 16 October 2010 21:39, Eugene Arshinov earshi...@gmail.com wrote: