summaryrefslogtreecommitdiff
path: root/src/state/editor
diff options
context:
space:
mode:
Diffstat (limited to 'src/state/editor')
-rw-r--r--src/state/editor/mod.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/state/editor/mod.rs b/src/state/editor/mod.rs
index 058bbf6..47d11bc 100644
--- a/src/state/editor/mod.rs
+++ b/src/state/editor/mod.rs
@@ -1,3 +1,5 @@
+use crate::cursor::CursorMove;
+
use self::{bar::EditorBarState, buffer::Buffer};
use super::{GlobalState, DUMMY_STATE};
@@ -84,6 +86,11 @@ impl UserData for EditorState {
methods.add_function("run", |lua, _: ()| {
EditorState::run(lua);
Ok(())
+ });
+
+ methods.add_function("move_cursor", |_, m: CursorMove| {
+ cfg_mut!().buffer.move_cursor(m);
+ Ok(())
})
}
}