feat(pane-nav): smart-splits under tmux, pane_nav for herdr/kitty
This commit is contained in:
1 parent
3a0e1cb13e
commit
7d448348b2
4 files changed
+50
-13
No files matched your search
@@ -141,6 +141,11 @@ end
|
||||
--- @param dir "left"|"down"|"up"|"right"
|
||||
function M.navigate(dir)
|
||||
local from = vim.api.nvim_get_current_win()
|
||||
-- Under tmux smart-splits owns the edge handoff (plugins/user.lua).
|
||||
if M.env() == "tmux" and vim.api.nvim_win_get_config(from).relative == "" then
|
||||
require("smart-splits")["move_cursor_" .. dir]()
|
||||
return
|
||||
end
|
||||
vim.cmd.wincmd(directions[dir].wincmd)
|
||||
if vim.api.nvim_get_current_win() ~= from then return end
|
||||
if vim.api.nvim_win_get_config(0).relative ~= "" then return end
|
||||
|
||||
Reference in new issue
Block a user