Mercurial > vim
comparison src/fileio.c @ 16744:e42e9fa83e60 v8.1.1374
patch 8.1.1374: check for file changed triggers too often
commit https://github.com/vim/vim/commit/c97582b0296cb6f63f3c2e5a0eb954f5920a8e42
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri May 24 11:45:22 2019 +0200
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 24 May 2019 12:00:07 +0200 |
parents | ed9b15758241 |
children | e2d8d83e6721 |
comparison
equal
deleted
inserted
replaced
16743:f49a29b2bbdd | 16744:e42e9fa83e60 |
---|---|
6774 // FileChangedShell autocmd) | 6774 // FileChangedShell autocmd) |
6775 if (stat_res < 0) | 6775 if (stat_res < 0) |
6776 { | 6776 { |
6777 // When 'autoread' is set we'll check the file again to see if it | 6777 // When 'autoread' is set we'll check the file again to see if it |
6778 // re-appears. | 6778 // re-appears. |
6779 buf->b_mtime = buf->b_p_ar; | 6779 buf->b_mtime = (buf->b_p_ar >= 0 ? buf->b_p_ar : p_ar); |
6780 buf->b_orig_size = 0; | 6780 buf->b_orig_size = 0; |
6781 buf->b_orig_mode = 0; | 6781 buf->b_orig_mode = 0; |
6782 } | 6782 } |
6783 else | 6783 else |
6784 buf_store_time(buf, &st, buf->b_ffname); | 6784 buf_store_time(buf, &st, buf->b_ffname); |