Skip to content

Commit

Permalink
docs: show the return values of the new pane:move_to_xxx methods
Browse files Browse the repository at this point in the history
  • Loading branch information
wez committed Mar 26, 2023
1 parent e56b169 commit 3666303
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/config/lua/pane/move_to_new_tab.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,20 @@

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

Returns the newly created [MuxTab](../MuxTab/index.md) object, and the
[MuxWindow](../mux-window/index.md) object that contains it:

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

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).
15 changes: 15 additions & 0 deletions docs/config/lua/pane/move_to_new_window.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@ 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.

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',
action = callback(function(win, pane)
local tab, window = pane:move_to_new_window()
end),
},
}
```

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).

Expand Down

0 comments on commit 3666303

Please sign in to comment.