mirror of
https://github.com/sxyazi/yazi.git
synced 2024-12-01 10:17:47 +03:00
feat: add new ya.render()
API
This commit is contained in:
parent
93c8d90a51
commit
72f924b9e5
@ -1,7 +1,7 @@
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use mlua::{ExternalError, Lua, Table, Value};
|
||||
use yazi_shared::{emit, event::Exec, Layer};
|
||||
use yazi_shared::{emit, event::Exec, render, Layer};
|
||||
|
||||
use super::Utils;
|
||||
use crate::ValueSendable;
|
||||
@ -29,6 +29,14 @@ impl Utils {
|
||||
}
|
||||
|
||||
pub(super) fn call(lua: &Lua, ya: &Table) -> mlua::Result<()> {
|
||||
ya.set(
|
||||
"render",
|
||||
lua.create_function(|_, ()| {
|
||||
render!();
|
||||
Ok(())
|
||||
})?,
|
||||
)?;
|
||||
|
||||
ya.set(
|
||||
"manager_emit",
|
||||
lua.create_async_function(
|
||||
|
Loading…
Reference in New Issue
Block a user