diff options
author | Bram Moolenaar <Bram@vim.org> | 2009-11-17 16:13:15 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2009-11-17 16:13:15 +0000 |
commit | f05da21900ee28e679a69439fd1c2ec94367e1d7 (patch) | |
tree | 94fa61ec2def86333b84eaa7bae85115f8373620 /src/memline.c | |
parent | 2d7ff056e13e66c135c67935f32e15a26b8dfd80 (diff) | |
download | vim-git-f05da21900ee28e679a69439fd1c2ec94367e1d7.tar.gz |
updated for version 7.2-300v7.2.300
Diffstat (limited to 'src/memline.c')
-rw-r--r-- | src/memline.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/memline.c b/src/memline.c index facdeb62e..480e93cf6 100644 --- a/src/memline.c +++ b/src/memline.c @@ -382,7 +382,7 @@ ml_open(buf) dp->db_index[0] = --dp->db_txt_start; /* at end of block */ dp->db_free -= 1 + INDEX_SIZE; dp->db_line_count = 1; - *((char_u *)dp + dp->db_txt_start) = NUL; /* emtpy line */ + *((char_u *)dp + dp->db_txt_start) = NUL; /* empty line */ return OK; @@ -490,6 +490,13 @@ ml_setname(buf) EMSG(_("E301: Oops, lost the swap file!!!")); return; } +#ifdef HAVE_FD_CLOEXEC + { + int fdflags = fcntl(mfp->mf_fd, F_GETFD); + if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0) + fcntl(mfp->mf_fd, F_SETFD, fdflags | FD_CLOEXEC); + } +#endif } if (!success) EMSG(_("E302: Could not rename swap file")); |