mirror of
https://github.com/wez/wezterm.git
synced 2024-11-28 01:06:37 +03:00
allow debug overlay to run async chunks
allows eg: `window:effective_config()` to print the config for the window
This commit is contained in:
parent
a0b8d2196a
commit
ace8253498
@ -141,7 +141,7 @@ pub fn show_debug_overlay(mut term: TermWizTerminal, gui_win: GuiWin) -> anyhow:
|
||||
|
||||
let expr = format!("return {}", line);
|
||||
let chunk = host.lua.load(&expr);
|
||||
match chunk.eval::<Value>() {
|
||||
match smol::block_on(chunk.eval_async::<Value>()) {
|
||||
Ok(result) => {
|
||||
let text = format!("{:?}", ValueWrapper(result));
|
||||
term.render(&[Change::Text(format!("{}\r\n", text.replace("\n", "\r\n")))])?;
|
||||
|
Loading…
Reference in New Issue
Block a user