diff options
Diffstat (limited to 'src/nvim/eval.lua')
| -rw-r--r-- | src/nvim/eval.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index 2e37a8bc76..3e4e535970 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -1952,10 +1952,11 @@ M.funcs = { did_filetype = { desc = [=[ Returns |TRUE| when autocommands are being executed and the - FileType event has been triggered at least once. Can be used - to avoid triggering the FileType event again in the scripts - that detect the file type. |FileType| + FileType event triggered at least once for a buffer with + a non-empty 'filetype'. Can be used to avoid triggering + the FileType event again in the |ftdetect| scripts. |FileType| Returns |FALSE| when `:setf FALLBACK` was used. + When editing another file, the counter is reset, thus this really checks if the FileType event has been triggered for the current buffer. This allows an autocommand that starts |