aboutsummaryrefslogtreecommitdiff
path: root/src/fileio.c
diff options
context:
space:
mode:
authorMarco Hinz <mh.codebro@gmail.com>2014-05-02 17:08:28 +0200
committerJustin M. Keyes <justinkz@gmail.com>2014-05-04 12:46:22 -0400
commite42a3cc4e628de812bc4fdd8b687ec1356286f22 (patch)
tree90acbdacbd4addf845e522a1c237c83cdf42b6a4 /src/fileio.c
parentddafdacb0046f5cd95b3023ced4d86073b0039f6 (diff)
downloadrneovim-e42a3cc4e628de812bc4fdd8b687ec1356286f22.tar.gz
rneovim-e42a3cc4e628de812bc4fdd8b687ec1356286f22.tar.bz2
rneovim-e42a3cc4e628de812bc4fdd8b687ec1356286f22.zip
vim-patch:7.4.274
Problem: When doing ":update" just before running an external command that changes the file, the timestamp may be unchanged and the file is not reloaded. Solution: Also check the file size. https://code.google.com/p/vim/source/detail?r=1ee3fc5b40ae94c2a7fc5a62bca38d4f730f9bb2
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/fileio.c b/src/fileio.c
index e9aff651c5..8fc06ecf9f 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -5118,6 +5118,7 @@ buf_check_timestamp (
&& buf->b_mtime != 0
&& ((stat_res = mch_stat((char *)buf->b_ffname, &st)) < 0
|| time_differs((long)st.st_mtime, buf->b_mtime)
+ || st.st_size != buf->b_orig_size
#ifdef HAVE_ST_MODE
|| (int)st.st_mode != buf->b_orig_mode
#else