summaryrefslogtreecommitdiff
path: root/src/state
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2024-12-07 17:17:22 +0100
committerNathan Reiner <nathan@nathanreiner.xyz>2024-12-07 17:17:22 +0100
commitc0598823335cfdc6deb5c48fe1ead8ecea18097e (patch)
tree561b47f9f459b9633c4244c3a0cabe12a44859c1 /src/state
parent53a9172bddbb83a1c570cc3fed794e7b73c1f1d7 (diff)
add error type to iobuffer
Diffstat (limited to 'src/state')
-rw-r--r--src/state/editor/mod.rs5
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);
}
}
}