mirror of
https://github.com/ThePrimeagen/harpoon.git
synced 2025-07-14 01:50:27 +00:00
Fixed gotobuffer
Fixed GotoBuffer to go to a terminal which is already closed.
This commit is contained in:
parent
4390b4c157
commit
b0a55a94ec
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user