mirror of
https://github.com/wez/wezterm.git
synced 2024-12-28 07:55:03 +03:00
parent
d9d6b2a01a
commit
e56b169cc4
@ -33,6 +33,8 @@ As features stabilize some brief notes about them will accumulate here.
|
|||||||
enables a nice translucent window effect. Thanks to @Gkirito! #3344
|
enables a nice translucent window effect. Thanks to @Gkirito! #3344
|
||||||
* [new-tab-button-click event](config/lua/window-events/new-tab-button-click.md)
|
* [new-tab-button-click event](config/lua/window-events/new-tab-button-click.md)
|
||||||
allows overriding the effect of clicking the New Tab button. #323
|
allows overriding the effect of clicking the New Tab button. #323
|
||||||
|
* [pane:move_to_new_window()](config/lua/pane/move_to_new_window.md),
|
||||||
|
[pane:move_to_new_tab()](config/lua/pane/move_to_new_tab.md). #3374
|
||||||
|
|
||||||
#### Fixed
|
#### Fixed
|
||||||
* ssh ProxyCommand didn't parse command lines containing `=` correctly. #3307
|
* ssh ProxyCommand didn't parse command lines containing `=` correctly. #3307
|
||||||
|
@ -14,6 +14,9 @@ The following arguments modify the behavior:
|
|||||||
* `--workspace WORKSPACE` - When using `--new-window`, use `WORKSPACE` as the name of the workspace for the newly created window rather than the default workspace name `"default"`.
|
* `--workspace WORKSPACE` - When using `--new-window`, use `WORKSPACE` as the name of the workspace for the newly created window rather than the default workspace name `"default"`.
|
||||||
* `--pane-id` - Specifies which pane to move. See also [Targeting Panes](index.md#targeting-panes).
|
* `--pane-id` - Specifies which pane to move. See also [Targeting Panes](index.md#targeting-panes).
|
||||||
|
|
||||||
|
See also: [pane:move_to_new_window()](../../config/lua/pane/move_to_new_window.md),
|
||||||
|
[pane:move_to_new_tab()](../../config/lua/pane/move_to_new_tab.md).
|
||||||
|
|
||||||
## Synopsis
|
## Synopsis
|
||||||
|
|
||||||
```console
|
```console
|
||||||
|
8
docs/config/lua/pane/move_to_new_tab.md
Normal file
8
docs/config/lua/pane/move_to_new_tab.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# `pane:move_to_new_tab()`
|
||||||
|
|
||||||
|
{{since('nightly')}}
|
||||||
|
|
||||||
|
Creates a new tab in the window that contains `pane`, and moves `pane` into that tab.
|
||||||
|
|
||||||
|
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).
|
14
docs/config/lua/pane/move_to_new_window.md
Normal file
14
docs/config/lua/pane/move_to_new_window.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# `pane:move_to_new_window([WORKSPACE])`
|
||||||
|
|
||||||
|
{{since('nightly')}}
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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).
|
||||||
|
|
||||||
|
|
@ -353,6 +353,32 @@ impl UserData for MuxPane {
|
|||||||
};
|
};
|
||||||
this.get_text_from_semantic_zone(zone)
|
this.get_text_from_semantic_zone(zone)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
methods.add_async_method("move_to_new_tab", |_lua, this, ()| async move {
|
||||||
|
let mux = Mux::get();
|
||||||
|
let (_domain, window_id, _tab) = mux
|
||||||
|
.resolve_pane_id(this.0)
|
||||||
|
.ok_or_else(|| mlua::Error::external(format!("pane {} not found", this.0)))?;
|
||||||
|
let (tab, window) = mux
|
||||||
|
.move_pane_to_new_tab(this.0, Some(window_id), None)
|
||||||
|
.await
|
||||||
|
.map_err(|e| mlua::Error::external(format!("{:#?}", e)))?;
|
||||||
|
|
||||||
|
Ok((MuxTab(tab.tab_id()), MuxWindow(window)))
|
||||||
|
});
|
||||||
|
|
||||||
|
methods.add_async_method(
|
||||||
|
"move_to_new_window",
|
||||||
|
|_lua, this, workspace: Option<String>| async move {
|
||||||
|
let mux = Mux::get();
|
||||||
|
let (tab, window) = mux
|
||||||
|
.move_pane_to_new_tab(this.0, None, workspace)
|
||||||
|
.await
|
||||||
|
.map_err(|e| mlua::Error::external(format!("{:#?}", e)))?;
|
||||||
|
|
||||||
|
Ok((MuxTab(tab.tab_id()), MuxWindow(window)))
|
||||||
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user