diff options
author | cflip <cflip@cflip.net> | 2023-01-08 21:25:21 -0700 |
---|---|---|
committer | cflip <cflip@cflip.net> | 2023-01-08 21:25:21 -0700 |
commit | c2e8836f592db9cf28111182ea40f1268c758933 (patch) | |
tree | 1dce79a44616787778a0223eb4e4dcfccf7f2e83 /main.c | |
parent | 76010f7b97e6b71db6e123d28c91f997ff56945c (diff) |
Connect the window and font code to the editor's main function
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -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; } |