1
1
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:
Wez Furlong 2023-05-20 19:54:24 -07:00
parent 43a8b442e3
commit e41c4405c7
No known key found for this signature in database
GPG Key ID: 7A7F66A31EC9B387

View File

@ -104,7 +104,9 @@ fn build_commands(
("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)