From 63e9c5e054099dd30af306bd8ceaa2f1086e1b07 Mon Sep 17 00:00:00 2001 From: kjubybot Date: Tue, 5 Mar 2024 17:13:13 +0400 Subject: [PATCH] respect v:count when navigating (#115) --- lua/tmux/navigation/navigate.lua | 2 +- spec/tmux/navigation/navigate_spec.lua | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/tmux/navigation/navigate.lua b/lua/tmux/navigation/navigate.lua index 47edb1b..95220c4 100644 --- a/lua/tmux/navigation/navigate.lua +++ b/lua/tmux/navigation/navigate.lua @@ -34,7 +34,7 @@ function M.to(direction) elseif is_nvim_border and options.navigation.cycle_navigation then nvim.wincmd(opposite_directions[direction], 999) elseif not is_nvim_border then - nvim.wincmd(direction) + nvim.wincmd(direction, vim.v.count) end end diff --git a/spec/tmux/navigation/navigate_spec.lua b/spec/tmux/navigation/navigate_spec.lua index d07a067..d688d3e 100644 --- a/spec/tmux/navigation/navigate_spec.lua +++ b/spec/tmux/navigation/navigate_spec.lua @@ -15,6 +15,12 @@ describe("navigate.has_tmux_target", function() layout = require("tmux.layout") options = require("tmux.configuration.options") tmux = require("tmux.wrapper.tmux") + + _G.vim = { + v = { + count = 1, + }, + } end) it("check is_tmux false", function()