summaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2011-02-15 17:39:22 +0100
committerBram Moolenaar <Bram@vim.org>2011-02-15 17:39:22 +0100
commitcab35ad26d2be6da4b3221f6f1a477312b93ea90 (patch)
treec8221a37b351a130162ebccb398938fa2937d8ca /src/os_unix.c
parentc2b4c62d0b3b25d2bb9bfc1e7e65c431e73ea1df (diff)
downloadvim-cab35ad26d2be6da4b3221f6f1a477312b93ea90.zip
updated for version 7.3.124
Problem: When writing a file in binary mode it may be missing the final EOL if a file previously read was missing the EOL. (Kevin Goodsell) Solution: Move the write_no_eol_lnum into the buffer struct.
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 0234f90d1..b227c8ea9 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -4245,7 +4245,7 @@ mch_call_shell(cmd, options)
* should not have one. */
if (lnum != curbuf->b_op_end.lnum
|| !curbuf->b_p_bin
- || (lnum != write_no_eol_lnum
+ || (lnum != curbuf->b_no_eol_lnum
&& (lnum !=
curbuf->b_ml.ml_line_count
|| curbuf->b_p_eol)))
@@ -4588,10 +4588,10 @@ finished:
{
append_ga_line(&ga);
/* remember that the NL was missing */
- write_no_eol_lnum = curwin->w_cursor.lnum;
+ curbuf->b_no_eol_lnum = curwin->w_cursor.lnum;
}
else
- write_no_eol_lnum = 0;
+ curbuf->b_no_eol_lnum = 0;
ga_clear(&ga);
}