fix permute_any_mods
The termwiz Modifiers type isn't the right one! Use the input layer types instead, and then we get the correct string formatting. refs: https://github.com/wez/wezterm/issues/3434
This commit is contained in:
3 files changed
+5
-1
No files matched your search
Generated
+1
@@ -5166,6 +5166,7 @@ dependencies = [
|
||||
"terminfo",
|
||||
"termwiz",
|
||||
"wezterm-dynamic",
|
||||
"wezterm-input-types",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
@@ -11,6 +11,7 @@ config = { path = "../../config" }
|
||||
finl_unicode = "1.2"
|
||||
terminfo = "0.8"
|
||||
wezterm-dynamic = { path = "../../wezterm-dynamic" }
|
||||
wezterm-input-types = { path = "../../wezterm-input-types" }
|
||||
luahelper = { path = "../../luahelper" }
|
||||
termwiz = { path = "../../termwiz", features=["use_serde"] }
|
||||
lazy_static = "1.4"
|
||||
@@ -204,6 +204,8 @@ fn permute_mods<'lua>(
|
||||
item: mlua::Table,
|
||||
allow_none: bool,
|
||||
) -> mlua::Result<Vec<mlua::Value<'lua>>> {
|
||||
use wezterm_input_types::Modifiers;
|
||||
|
||||
let mut result = vec![];
|
||||
for ctrl in &[Modifiers::NONE, Modifiers::CTRL] {
|
||||
for shift in &[Modifiers::NONE, Modifiers::SHIFT] {
|
||||
@@ -219,7 +221,7 @@ fn permute_mods<'lua>(
|
||||
let (k, v) = pair?;
|
||||
new_item.set(k, v)?;
|
||||
}
|
||||
new_item.set("mods", format!("{:?}", flags))?;
|
||||
new_item.set("mods", flags.to_string())?;
|
||||
result.push(new_item.to_lua(lua)?);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user