mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00
clarified the reason for wait
This commit is contained in:
@@ -63,10 +63,12 @@ static void do_autocmd_focusgained(bool gained)
|
|||||||
NULL, NULL, false, curbuf);
|
NULL, NULL, false, curbuf);
|
||||||
|
|
||||||
// When activated: Check if any file was modified outside of Vim.
|
// When activated: Check if any file was modified outside of Vim.
|
||||||
// Only do this when not done within the last two seconds (could get
|
// Only do this when not done within the last two seconds as:
|
||||||
// several events in a row).
|
// 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);
|
need_redraw = check_timestamps(true);
|
||||||
last_time = os_now();
|
last_time = os_now();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user