blob: 1d17f799d587b8bc136b14616a0d48b4763f6580 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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;
}
|