1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-23 21:32:13 +03:00

fix pane:split{}

Similar issue as 31eb4fe271

refs: https://github.com/wez/wezterm/issues/3985
This commit is contained in:
Wez Furlong 2023-07-13 17:42:40 -07:00
parent f73f718098
commit 115e629ec1
No known key found for this signature in database
GPG Key ID: 7A7F66A31EC9B387

View File

@ -1,6 +1,6 @@
use super::*; use super::*;
use luahelper::{dynamic_to_lua_value, from_lua, to_lua}; use luahelper::{dynamic_to_lua_value, from_lua, to_lua};
use mlua::{UserDataRef, Value}; use mlua::Value;
use std::cmp::Ordering; use std::cmp::Ordering;
use std::sync::Arc; use std::sync::Arc;
use termwiz::cell::SemanticType; use termwiz::cell::SemanticType;
@ -89,15 +89,9 @@ impl UserData for MuxPane {
}); });
methods.add_method("pane_id", |_, this, _: ()| Ok(this.0)); methods.add_method("pane_id", |_, this, _: ()| Ok(this.0));
methods.add_async_method( methods.add_async_method("split", |_, this, args: Option<SplitPane>| async move {
"split", args.unwrap_or_default().run(this).await
|_, this, args: Option<UserDataRef<SplitPane>>| async move { });
match args {
Some(args) => args.run(this).await,
None => SplitPane::default().run(this).await,
}
},
);
methods.add_method("send_paste", |_, this, text: String| { methods.add_method("send_paste", |_, this, text: String| {
let mux = get_mux()?; let mux = get_mux()?;