Skip to content

pane:move_to_new_tab()

Since: Version 20230326-111934-3666303c

The functionality described in this section requires version 20230326-111934-3666303c of wezterm, or a more recent version.

Creates a new tab in the window that contains pane, and moves pane into that tab.

Returns the newly created MuxTab object, and the MuxWindow object that contains it:

config.keys = {
  {
    key = '!',
    mods = 'LEADER | SHIFT',
    action = wezterm.action_callback(function(win, pane)
      local tab, window = pane:move_to_new_tab()
    end),
  },
}

See also pane:move_to_new_window(), wezterm cli move-pane-to-new-tab.