refactor: simplify git and terminal
This commit is contained in:
+1
-2
@@ -10,10 +10,9 @@ local function open(cmd)
|
||||
height = h,
|
||||
row = math.floor((lines - h) / 2),
|
||||
col = math.floor((vim.o.columns - w) / 2),
|
||||
border = 'rounded',
|
||||
})
|
||||
|
||||
vim.fn.termopen(cmd, { on_exit = function() pcall(vim.api.nvim_win_close, win, true) end })
|
||||
vim.fn.jobstart(cmd, { term = true, on_exit = function() pcall(vim.api.nvim_win_close, win, true) end })
|
||||
end
|
||||
|
||||
return { open = open }
|
||||
|
||||
Reference in New Issue
Block a user