diff options
Diffstat (limited to 'src/state/editor/mod.rs')
| -rw-r--r-- | src/state/editor/mod.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/state/editor/mod.rs b/src/state/editor/mod.rs index 3e9d9e0..25765cc 100644 --- a/src/state/editor/mod.rs +++ b/src/state/editor/mod.rs @@ -4,6 +4,7 @@ use self::{bar::EditorBarState, buffer::Buffer, cursorshape::CursorShape}; use super::{window::Window, GlobalState, DUMMY_STATE}; use mlua::{Lua, UserData}; +use crate::lua::iobuffer; pub mod bar; pub mod buffer; @@ -35,8 +36,8 @@ impl EditorState { pub fn run(lua: &Lua) { let script = { cfg!().buffer.as_string() }; - if let Err(_error) = lua.load(script).exec() { - // TODO: add error handling + if let Err(error) = lua.load(script).exec() { + iobuffer::iobuffer().write().unwrap().error(error); } } } |