2019-08-22 14:25:18 -04:00
|
|
|
mod editor;
|
|
|
|
mod helpers;
|
|
|
|
|
2019-08-22 16:44:47 -04:00
|
|
|
use crate::editor::Editor;
|
|
|
|
use crate::helpers::{STDIN_FILENO, enable_raw_mode};
|
2019-08-22 14:25:18 -04:00
|
|
|
|
2019-08-22 16:44:47 -04:00
|
|
|
fn main() {
|
|
|
|
enable_raw_mode().unwrap();
|
2019-08-22 14:25:18 -04:00
|
|
|
|
2019-08-22 16:44:47 -04:00
|
|
|
let mut editor = Editor::new();
|
2019-08-22 14:25:18 -04:00
|
|
|
|
2019-08-22 16:44:47 -04:00
|
|
|
while editor.process_keypress().is_some() {
|
|
|
|
// loop
|
2019-08-21 16:46:14 -04:00
|
|
|
}
|
|
|
|
}
|