mirror of
https://github.com/ThePrimeagen/harpoon.git
synced 2025-07-13 17:40:25 +00:00
Merge pull request #159 from svrana/tmux-goto-pane
Fix tmux gotoTerminal for panes
This commit is contained in:
commit
eaff8ac534
@ -70,7 +70,10 @@ local function find_terminal(args)
|
|||||||
if type(args) == "string" then
|
if type(args) == "string" then
|
||||||
-- assume args is a valid tmux target identifier
|
-- assume args is a valid tmux target identifier
|
||||||
-- if invalid, the error returned by tmux will be thrown
|
-- if invalid, the error returned by tmux will be thrown
|
||||||
return { window_id = args }
|
return {
|
||||||
|
window_id = args,
|
||||||
|
pane = true,
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
if type(args) == "number" then
|
if type(args) == "number" then
|
||||||
@ -118,7 +121,7 @@ function M.gotoTerminal(idx)
|
|||||||
|
|
||||||
local _, ret, stderr = utils.get_os_command_output({
|
local _, ret, stderr = utils.get_os_command_output({
|
||||||
"tmux",
|
"tmux",
|
||||||
"select-window",
|
window_handle.pane and "select-pane" or "select-window",
|
||||||
"-t",
|
"-t",
|
||||||
window_handle.window_id,
|
window_handle.window_id,
|
||||||
}, vim.loop.cwd())
|
}, vim.loop.cwd())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user