mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-08 00:14:38 +02:00
fix(autocmds): avoid checktime when buftype=nofile (#2270)
It triggered an 'E11: Invalid in command-line window; <CR> executes, CTRL-C quits' error when Neovim was in Command Line window and FocusGained.
This commit is contained in:
parent
c72db4938c
commit
8e2046f3d0
1 changed files with 5 additions and 1 deletions
|
@ -7,7 +7,11 @@ end
|
|||
-- Check if we need to reload the file when it changed
|
||||
vim.api.nvim_create_autocmd({ "FocusGained", "TermClose", "TermLeave" }, {
|
||||
group = augroup("checktime"),
|
||||
command = "checktime",
|
||||
callback = function()
|
||||
if vim.o.buftype ~= 'nofile' then
|
||||
vim.cmd('checktime')
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
-- Highlight on yank
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue