mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 10:49:08 +00:00
feat(win): win:focus()
This commit is contained in:
parent
8be14c68a7
commit
476fb56bfd
1 changed files with 6 additions and 0 deletions
|
@ -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 {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue