Skip to content

Commit

Permalink
respect v:count when navigating (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
kjubybot authored Mar 5, 2024
1 parent 9c02adf commit 63e9c5e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lua/tmux/navigation/navigate.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 6 additions & 0 deletions spec/tmux/navigation/navigate_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 63e9c5e

Please sign in to comment.