@iyernaveenr Geany will always show newline at the end of the file __if it exists in the file__, but will not show newline if it does not exist in the file, there is no ambiguity or bug.
But Vim does not show the newline at the end of the file it even if it exists, so this is ambiguous behaviour of Vim and a bug in Vim, feel free to open a bug on Vim.