mirror of
https://github.com/akinsho/toggleterm.nvim
synced 2024-09-16 21:34:03 +02:00
fix(terminal): ensure mappings and autocommands set
for custom terminals fixes #459
This commit is contained in:
parent
2249e974fa
commit
0144aaaaf0
1 changed files with 2 additions and 2 deletions
|
@ -394,6 +394,8 @@ function Terminal:__spawn()
|
|||
})
|
||||
self.name = cmd
|
||||
self.dir = dir
|
||||
setup_buffer_autocommands(self)
|
||||
setup_buffer_mappings(self.bufnr)
|
||||
end
|
||||
|
||||
---@package
|
||||
|
@ -455,8 +457,6 @@ function Terminal:spawn()
|
|||
self.bufnr = ui.create_buf()
|
||||
self:__add()
|
||||
api.nvim_buf_call(self.bufnr, function() self:__spawn() end)
|
||||
setup_buffer_autocommands(self)
|
||||
setup_buffer_mappings(self.bufnr)
|
||||
if self.on_create then self:on_create() end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue