feat(win): win:focus()

This commit is contained in:
Folke Lemaitre 2024-11-06 23:07:00 +01:00
parent 8be14c68a7
commit 476fb56bfd
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -173,6 +173,12 @@ function M.new(opts)
return self
end
function M:focus()
if self:valid() then
vim.api.nvim_set_current_win(self.win)
end
end
---@param opts? { buf: boolean }
function M:close(opts)
opts = opts or {}