mirror of
https://github.com/wez/wezterm.git
synced 2024-12-23 13:21:38 +03:00
fix pane:split{}
Similar issue as 31eb4fe271
refs: https://github.com/wez/wezterm/issues/3985
This commit is contained in:
parent
f73f718098
commit
115e629ec1
@ -1,6 +1,6 @@
|
||||
use super::*;
|
||||
use luahelper::{dynamic_to_lua_value, from_lua, to_lua};
|
||||
use mlua::{UserDataRef, Value};
|
||||
use mlua::Value;
|
||||
use std::cmp::Ordering;
|
||||
use std::sync::Arc;
|
||||
use termwiz::cell::SemanticType;
|
||||
@ -89,15 +89,9 @@ impl UserData for MuxPane {
|
||||
});
|
||||
methods.add_method("pane_id", |_, this, _: ()| Ok(this.0));
|
||||
|
||||
methods.add_async_method(
|
||||
"split",
|
||||
|_, this, args: Option<UserDataRef<SplitPane>>| async move {
|
||||
match args {
|
||||
Some(args) => args.run(this).await,
|
||||
None => SplitPane::default().run(this).await,
|
||||
}
|
||||
},
|
||||
);
|
||||
methods.add_async_method("split", |_, this, args: Option<SplitPane>| async move {
|
||||
args.unwrap_or_default().run(this).await
|
||||
});
|
||||
|
||||
methods.add_method("send_paste", |_, this, text: String| {
|
||||
let mux = get_mux()?;
|
||||
|
Loading…
Reference in New Issue
Block a user