diff options
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -0,0 +1,25 @@ +#include "input.h" +#include "file.h" +#include "editor.h" +#include "terminal.h" + +int main(int argc, char** argv) +{ + enable_raw_mode(); + + struct editor_state editor; + init_editor(&editor); + + if (argc >= 2) { + editor_open(&editor, argv[1]); + } + + 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); + } + + return 0; +} |