In Preferences -> Files there is an option "Ensure new line at file end" that, as far as I understand, is supposed to enable/disable adding of a new line in the end of the file if the last line is not empty. However, even when this option is disabled (unticked), if the last line is not empty and you save the file, Geany adds a new line after the last one.