diff --git a/plugin/harpoon.vim b/plugin/harpoon.vim index d9271a2..8e08de5 100644 --- a/plugin/harpoon.vim +++ b/plugin/harpoon.vim @@ -20,6 +20,14 @@ fun! GotoBuffer(ctrlId) echo "Unable to create a terminal or find the terminal's information." end + let bufh = l:contents[1] + if !bufexists(bufh) + " Create the terminal + terminal + call SetBuffer(a:ctrlId) + endif + + let contents = g:win_ctrl_buf_list[a:ctrlId] let bufh = l:contents[1] call nvim_win_set_buf(0, l:bufh) endfun @@ -55,7 +63,3 @@ fun! SendTerminalCommand(ctrlId, command) let job_id = l:contents[0] call chansend(l:job_id, a:command) endfun - - - -