|
@@ -7,10 +7,13 @@ vim.api.nvim_create_autocmd('TermOpen', {
|
|
|
end
|
|
|
})
|
|
|
|
|
|
--- leave insert when terminal process exits
|
|
|
--- this prevents the window from closing
|
|
|
+-- preserve window structure when exiting terminal via C-d
|
|
|
vim.api.nvim_create_autocmd('TermClose', {
|
|
|
- command = 'stopinsert',
|
|
|
+ callback = function(opts)
|
|
|
+ MiniBufremove.delete(opts.buf)
|
|
|
+ end,
|
|
|
+ -- needed so statusline properly updates
|
|
|
+ nested = true,
|
|
|
})
|
|
|
|
|
|
-- automatically enter/leave terminal mode
|