index : neolij.nvim
Seamless Neovim/Zellij integration with built-in navigation, pane/tab management, and Lua scripting.
about summary refs log tree commit diff

Diffstat

-rw-r--r-- lua/zellij/init.lua 17
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/lua/zellij/init.lua b/lua/zellij/init.lua
index 8fab1d8..8e3908d 100644
--- a/lua/zellij/init.lua
+++ b/lua/zellij/init.lua
@@ -44,11 +44,12 @@

-- Tab actions
function M.new_tab(opts)
  local args = opts.args or ""
  if type(opts) == "table" then
    opts = opts.args
  end

  if args ~= "" then
    -- allow custom flags like -d right, -n name, etc
    M.zellij_action("new-tab " .. args)
  if opts ~= "" then
    M.zellij_action("new-tab " .. opts)
  else
    M.zellij_action("new-tab")
  end
@@ -77,11 +78,13 @@

-- Pane actions
function M.new_pane(opts)
  local args = opts.args or ""
  if type(opts) == "table" then
    opts = opts.args
  end

  if args ~= "" then
  if opts ~= "" then
    -- allow custom flags like -d right, -n name, etc
    M.zellij_action("new-pane " .. args)
    M.zellij_action("new-pane " .. opts)
  else
    M.zellij_action("new-pane")
  end