Commit 6a0ea821 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

fix breakage

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3085 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 7 additions and 2 deletions
+7 -2
......@@ -1429,8 +1429,13 @@ int write_file(const char *name, FILE *f_open, bool tmp, append_type
}
/* If we're on the last line of the file, don't write a newline
* character after it. */
if (fileptr != openfile->filebot) {
* character after it. If the last line of the file is blank,
* this means that zero bytes are written, in which case we
* don't count the last line in the total lines written. */
if (fileptr == openfile->filebot) {
if (fileptr->data[0] == '\0')
lineswritten--;
} else {
#ifndef NANO_SMALL
if (openfile->fmt == DOS_FILE || openfile->fmt ==
MAC_FILE) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment