gui: fixup config overrides typing

refs: https://github.com/wez/wezterm/issues/2042
This commit is contained in:
Wez Furlong committed 2022-05-27 18:41:48 -07:00
1 parent 03e07ece56
commit 8d29631808
1 file changed
+5 -5
+5 -5
View File
@@ -116,7 +116,7 @@ impl UserData for GuiWin {
Ok((*config).clone())
});
methods.add_async_method("get_config_overrides", |_, this, _: ()| async move {
methods.add_async_method("get_config_overrides", |lua, this, _: ()| async move {
let (tx, rx) = smol::channel::bounded(1);
this.window.notify(TermWindowNotif::GetConfigOverrides(tx));
let overrides = rx
@@ -125,12 +125,12 @@ impl UserData for GuiWin {
.map_err(|e| anyhow::anyhow!("{:#}", e))
.map_err(luaerr)?;
let wrap = ValueLua { value: overrides };
Ok(wrap)
dynamic_to_lua_value(lua, overrides)
});
methods.add_method("set_config_overrides", |_, this, value: ValueLua| {
methods.add_method("set_config_overrides", |_, this, value: mlua::Value| {
let value = lua_value_to_dynamic(value)?;
this.window
.notify(TermWindowNotif::SetConfigOverrides(value.value));
.notify(TermWindowNotif::SetConfigOverrides(value));
Ok(())
});
methods.add_async_method("leader_is_active", |_, this, _: ()| async move {