Skip to content

Commit 41fb98d

Browse files
authored
fix: move fswatch linux check inside of vim.schedule (neovim#27824)
Fixes issue reported in the original PR: neovim#27810 Signed-off-by: Tomas Slusny <[email protected]>
1 parent 3bd8431 commit 41fb98d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Diff for: runtime/lua/vim/_watch.lua

+4-3
Original file line numberDiff line numberDiff line change
@@ -289,10 +289,11 @@ function M.fswatch(path, opts, callback)
289289
end
290290

291291
if data and #vim.trim(data) > 0 then
292-
if vim.fn.has('linux') == 1 and vim.startswith(data, 'Event queue overflow') then
293-
data = 'inotify(7) limit reached, see :h fswatch-limitations for more info.'
294-
end
295292
vim.schedule(function()
293+
if vim.fn.has('linux') == 1 and vim.startswith(data, 'Event queue overflow') then
294+
data = 'inotify(7) limit reached, see :h fswatch-limitations for more info.'
295+
end
296+
296297
vim.notify('fswatch: ' .. data, vim.log.levels.ERROR)
297298
end)
298299
end

0 commit comments

Comments
 (0)