Skip to content

Commit

Permalink
fix(commands): the last commit done right (Close #20, again)
Browse files Browse the repository at this point in the history
  • Loading branch information
nyngwang committed Mar 14, 2023
1 parent d97a554 commit 2fe5beb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lua/neo-term/utils/rpc_git.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ local M = {}

function M.host_run(arg, socket_guest)
vim.cmd('NeoTermToggle')
if #vim.api.nvim_tabpage_list_wins(0) == 1 then
vim.cmd('vsplit')
end
if #vim.tbl_filter(
function (w) return vim.api.nvim_win_get_config(w).relative == '' end,
vim.api.nvim_tabpage_list_wins(0)
) == 1
then vim.cmd('vsplit') end

local buf_enter = vim.api.nvim_get_current_buf()
vim.cmd('e ' .. arg)
local buf_commit = vim.api.nvim_get_current_buf()
Expand Down

0 comments on commit 2fe5beb

Please sign in to comment.