diff options
author | BK1603 <chouhan.shreyansh2702@gmail.com> | 2020-07-02 23:56:55 +0530 |
---|---|---|
committer | BK1603 <chouhan.shreyansh2702@gmail.com> | 2020-07-02 23:56:55 +0530 |
commit | ae183990ee94ce48b3aec28e83de094df1ef880c (patch) | |
tree | ce829e9be8d332d52a312ffd4dad93ff544586cf | |
parent | a2370a5df056c4c92a8d3dee27a543941c3836ea (diff) | |
download | rneovim-ae183990ee94ce48b3aec28e83de094df1ef880c.tar.gz rneovim-ae183990ee94ce48b3aec28e83de094df1ef880c.tar.bz2 rneovim-ae183990ee94ce48b3aec28e83de094df1ef880c.zip |
clarified the reason for wait
-rw-r--r-- | src/nvim/aucmd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/nvim/aucmd.c b/src/nvim/aucmd.c index de11ae8a65..18404c4cd5 100644 --- a/src/nvim/aucmd.c +++ b/src/nvim/aucmd.c @@ -63,10 +63,12 @@ static void do_autocmd_focusgained(bool gained) NULL, NULL, false, curbuf); // When activated: Check if any file was modified outside of Vim. - // Only do this when not done within the last two seconds (could get - // several events in a row). + // Only do this when not done within the last two seconds as: + // 1. Some filesystems have modification time granularity in seconds. Fat32 + // has a granularity of 2 seconds. + // 2. We could get multiple notifications in a row. - if (gained && last_time + (Timestamp)1500 < os_now()) { + if (gained && last_time + (Timestamp)2000 < os_now()) { need_redraw = check_timestamps(true); last_time = os_now(); } |