Page 1 of 1

PB-Editor should insert an empty line at the end of the code

Posted: Sat Feb 10, 2018 1:26 am
by Sicro
The PB editor should insert an empty line at the end of the code.

Many Linux programs require this on text files and otherwise do not work correctly.
For example:

Code: Select all

$ wc -l file.pb
returns the value "0" as the number of lines even though a line of code exists.

Re: PB-Editor should insert an empty line at the end of the

Posted: Sat Feb 10, 2018 10:04 am
by #NULL
My Linuy PB-IDE even removes one last linebreak every time i save the file and reopen the Editor. I don't want an editor to do that either way. Might be Scintilla or the Prefs handling, i don't know.
But for wc: its counts newline characters, not lines. Otherwise it would get ambiguous. Does an empty file has one empty line or zero lines?

Re: PB-Editor should insert an empty line at the end of the

Posted: Sat Feb 17, 2018 9:06 am
by Oma
I agree with you.
If you edit a PureBasic source code file with another program, it is very likely that the last line will be missing when you reload it.