mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 23:18:33 +00:00
Merge pull request #35769 from zeertzjq/backport
fix(lua): don't leak handle when vim._watch.watch() fails (#35768)
This commit is contained in:
@@ -102,6 +102,7 @@ function M.watch(path, opts, callback)
|
|||||||
-- This is mostly a placeholder until we have `nvim_log` API.
|
-- This is mostly a placeholder until we have `nvim_log` API.
|
||||||
vim.notify_once(('watch.watch: %s'):format(start_err), vim.log.levels.INFO)
|
vim.notify_once(('watch.watch: %s'):format(start_err), vim.log.levels.INFO)
|
||||||
end
|
end
|
||||||
|
handle:close()
|
||||||
-- TODO(justinmk): log important errors once we have `nvim_log` API.
|
-- TODO(justinmk): log important errors once we have `nvim_log` API.
|
||||||
return function() end
|
return function() end
|
||||||
end
|
end
|
||||||
|
@@ -3067,7 +3067,7 @@ describe('extmark decorations', function()
|
|||||||
]])
|
]])
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it('redraws extmark that starts and ends outisde the screen', function()
|
it('redraws extmark that starts and ends outside the screen', function()
|
||||||
local lines = vim.split(('1'):rep(20), '', { plain = true })
|
local lines = vim.split(('1'):rep(20), '', { plain = true })
|
||||||
api.nvim_buf_set_lines(0, 0, -1, true, lines)
|
api.nvim_buf_set_lines(0, 0, -1, true, lines)
|
||||||
api.nvim_buf_set_extmark(0, ns, 0, 0, { hl_group = 'ErrorMsg', end_row = 19, end_col = 0 })
|
api.nvim_buf_set_extmark(0, ns, 0, 0, { hl_group = 'ErrorMsg', end_row = 19, end_col = 0 })
|
||||||
|
Reference in New Issue
Block a user