As I've posted on the vim_use group, Vim presently always runs FileChangedShellPost autocommands whenever it checks if "the file was changed "outside of vim", whether it has changed or not. This includes every focus gained event in the GUI.
IMO this is a bug, and makes the event not useful in some contexts. Below is a patch to fix it. John *** src/fileio.c 2008-05-19 15:23:53.000000000 +1200 --- /home/john/fileio.c 2008-05-19 15:25:12.000000000 +1200 *************** *** 6557,6563 **** buf_reload(buf, orig_mode); #ifdef FEAT_AUTOCMD ! if (buf_valid(buf)) (void)apply_autocmds(EVENT_FILECHANGEDSHELLPOST, buf->b_fname, buf->b_fname, FALSE, buf); #endif --- 6557,6564 ---- buf_reload(buf, orig_mode); #ifdef FEAT_AUTOCMD ! if (buf_valid(buf) && retval != 0) ! /* If buffer was changed do post autocommand, whether reloaded or not. */ (void)apply_autocmds(EVENT_FILECHANGEDSHELLPOST, buf->b_fname, buf->b_fname, FALSE, buf); #endif --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---