2023-03-26 21:07:44 +03:00
|
|
|
# `pane:move_to_new_window([WORKSPACE])`
|
|
|
|
|
2023-03-27 05:45:32 +03:00
|
|
|
{{since('20230326-111934-3666303c')}}
|
2023-03-26 21:07:44 +03:00
|
|
|
|
|
|
|
Creates a window and moves `pane` into that window.
|
|
|
|
|
|
|
|
The *WORKSPACE* parameter is optional; if specified, it will be used
|
|
|
|
as the name of the workspace that should be associated with the new
|
|
|
|
window. Otherwise, the current active workspace will be used.
|
|
|
|
|
2023-03-26 21:19:34 +03:00
|
|
|
Returns the newly created [MuxTab](../MuxTab/index.md) object, and the
|
|
|
|
newly created [MuxWindow](../mux-window/index.md) object.
|
|
|
|
|
|
|
|
```lua
|
|
|
|
config.keys = {
|
|
|
|
{
|
|
|
|
key = '!',
|
|
|
|
mods = 'LEADER | SHIFT',
|
2023-04-11 18:38:01 +03:00
|
|
|
action = wezterm.action_callback(function(win, pane)
|
2023-03-26 21:19:34 +03:00
|
|
|
local tab, window = pane:move_to_new_window()
|
|
|
|
end),
|
|
|
|
},
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2023-03-26 21:07:44 +03:00
|
|
|
See also [pane:move_to_new_window()](move_to_new_window.md),
|
|
|
|
[wezterm cli move-pane-to-new-tab](../../../cli/cli/move-pane-to-new-tab.md).
|
|
|
|
|
|
|
|
|