From 627be003bfe51bf2ac2293f4fffc8e239cad6099 Mon Sep 17 00:00:00 2001 From: Pranav Rao <56097527+pranavrao145@users.noreply.github.com> Date: Thu, 3 Feb 2022 22:26:19 -0500 Subject: [PATCH] fix(tmux): fix tmux module to comply with latest changes to tmux API --- lua/harpoon/tmux.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/harpoon/tmux.lua b/lua/harpoon/tmux.lua index 4e58821..081bedf 100644 --- a/lua/harpoon/tmux.lua +++ b/lua/harpoon/tmux.lua @@ -54,9 +54,9 @@ local function terminal_exists(window_id) -- This has to be done this way because tmux has-session does not give -- updated results for _, line in pairs(window_list) do - local window_info = utils.split_string(line, "@")[1] + local window_info = utils.split_string(line, "@")[2] - if string.find(window_info, window_id) then + if string.find(window_info, string.sub(window_id, 2)) then exists = true end end @@ -118,7 +118,7 @@ function M.gotoTerminal(idx) local _, ret, stderr = utils.get_os_command_output({ "tmux", - "select-pane", + "select-window", "-t", window_handle.window_id, }, vim.loop.cwd())