aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fileio.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-08-01 04:24:16 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-08-01 04:29:39 -0400
commit7995a5e96420c3cc2e6caff80b94264631f9dbd9 (patch)
tree0db583baf0d56c6f87d3a4b4231dc28412e427b0 /src/nvim/fileio.c
parent28946c285b41f199ae1d2ddd214e57b7f442fbb1 (diff)
downloadrneovim-7995a5e96420c3cc2e6caff80b94264631f9dbd9.tar.gz
rneovim-7995a5e96420c3cc2e6caff80b94264631f9dbd9.tar.bz2
rneovim-7995a5e96420c3cc2e6caff80b94264631f9dbd9.zip
vim-patch:8.1.1374: check for file changed triggers too often
Problem: Check for file changed triggers too often. Solution: Don't use "b_p_ar" when it is negative. https://github.com/vim/vim/commit/c97582b0296cb6f63f3c2e5a0eb954f5920a8e42
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r--src/nvim/fileio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index 56c74fbfd6..d5b61a802a 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -4847,7 +4847,7 @@ buf_check_timestamp(
if (!file_info_ok) {
// When 'autoread' is set we'll check the file again to see if it
// re-appears.
- buf->b_mtime = buf->b_p_ar;
+ buf->b_mtime = (buf->b_p_ar >= 0 ? buf->b_p_ar : p_ar);
buf->b_orig_size = 0;
buf->b_orig_mode = 0;
} else {