mirror of
https://github.com/wez/wezterm.git
synced 2024-10-27 08:09:45 +03:00
palette: avoid spurious warning when opening command palette
If you haven't registered an augment-command-palette event, you'd see: ``` 16:29:02.641 WARN wezterm_gui::termwindow::palette > augment-command-palette: error converting Lua nil to Rust Type (Cannot convert `Null` to `Vec`) ``` refs: https://github.com/wez/wezterm/issues/3595
This commit is contained in:
parent
43a8b442e3
commit
e41c4405c7
@ -104,7 +104,9 @@ fn build_commands(
|
|||||||
("augment-command-palette".to_string(), (gui_window, pane)),
|
("augment-command-palette".to_string(), (gui_window, pane)),
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
entries = from_lua_value_dynamic(result)?;
|
if !matches!(&result, mlua::Value::Nil) {
|
||||||
|
entries = from_lua_value_dynamic(result)?;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(entries)
|
Ok(entries)
|
||||||
|
Loading…
Reference in New Issue
Block a user