mirror of
https://github.com/neovim/neovim
synced 2025-07-17 01:31:48 +00:00
fix: move fswatch linux check inside of vim.schedule (#27824)
Fixes issue reported in the original PR: https://github.com/neovim/neovim/pull/27810 Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
@ -289,10 +289,11 @@ function M.fswatch(path, opts, callback)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if data and #vim.trim(data) > 0 then
|
if data and #vim.trim(data) > 0 then
|
||||||
if vim.fn.has('linux') == 1 and vim.startswith(data, 'Event queue overflow') then
|
|
||||||
data = 'inotify(7) limit reached, see :h fswatch-limitations for more info.'
|
|
||||||
end
|
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
|
if vim.fn.has('linux') == 1 and vim.startswith(data, 'Event queue overflow') then
|
||||||
|
data = 'inotify(7) limit reached, see :h fswatch-limitations for more info.'
|
||||||
|
end
|
||||||
|
|
||||||
vim.notify('fswatch: ' .. data, vim.log.levels.ERROR)
|
vim.notify('fswatch: ' .. data, vim.log.levels.ERROR)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user