[Github-comments] [geany/geany] Blank extra line displayed for files with terminating newline (#2727)

James Shorthouse notifications at xxxxx
Tue Jan 12 16:22:25 UTC 2021


I understand that this is a subjective issue, so perhaps it could be a configuration option (like automatically adding a terminating newline on save is)?

I think there are valid arguments for either side. I know there are many other IDEs that behave the same was as Geany currently does, but in my personal opinion they behave incorrectly. 

Early text editors such as Vim and Emac displayed files with lines according to POSIX. It was the newer IDEs that decided to come along and break this long standing convention, and thereby causing all of this confusion. If they had just stuck to the POSIX-correct interpretation of newlines as Vim and Emacs do then I think there would be no confusion and debate around terminating newlines.

>The behaviour of Geany is self consistent, if you move the cursor after the newline it goes to the start of the next line.

I'd argue this isn't consistent at all because the last "line" isn't a line at all (according to POSIX). Trying to move the cursor past the last line with text shouldn't go anywhere.

>vscode

You are correct that vscode behaves the same way as geany by default, but it also has a configuration option to hide the last line (`editor.renderFinalNewline`).

In summary I can understand why people would want the editor to show lines this way, but there are also many people who don't. As previously explained the current behaviour is inconsistent with basically all long-standing unix tools, from inspecting a file with `vim` or `wc -l` is appears that geany is adding blank lines. The default behaviour can be kept but I would very much appreciate an option to hide the final line if possible.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2727#issuecomment-758770397
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20210112/94e3ee6c/attachment.htm>


More information about the Github-comments mailing list