summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/main.c b/main.c
index 1d17f79..3718c41 100644
--- a/main.c
+++ b/main.c
@@ -1,11 +1,11 @@
#include "input.h"
#include "file.h"
#include "editor.h"
-#include "terminal.h"
+#include "window.h"
int main(int argc, char** argv)
{
- enable_raw_mode();
+ window_init();
struct editor_state editor;
init_editor(&editor);
@@ -16,10 +16,12 @@ int main(int argc, char** argv)
editor_set_status_message(&editor, "HELP: Ctrl+Q = quit, Ctrl+S = save, Ctrl+F = find");
- while (1) {
- editor_refresh_screen(&editor);
- editor_process_keypress(&editor);
+ while (window_handle_event()) {
+ window_redraw(&editor);
+ // editor_refresh_screen(&editor);
+ // editor_process_keypress(&editor);
}
+ window_destroy();
return 0;
}