Made Editor Config global
This commit is contained in:
@@ -16,21 +16,21 @@
|
||||
#include "include/output.h"
|
||||
#include "include/terminal.h"
|
||||
|
||||
struct editorConfig E;
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
|
||||
struct editorConfig E;
|
||||
|
||||
enableRawMode(&E);
|
||||
initEditor(&E);
|
||||
enableRawMode();
|
||||
initEditor();
|
||||
if (argc >= 2) {
|
||||
editorOpen(&E, argv[1]);
|
||||
editorOpen(argv[1]);
|
||||
}
|
||||
|
||||
editorSetStatusMessage(&E, "HELP: Ctrl-S = save | Ctrl-Q = quit");
|
||||
editorSetStatusMessage("HELP: Ctrl-S = save | Ctrl-Q = quit");
|
||||
|
||||
while (1) {
|
||||
editorRefreshScreen(&E);
|
||||
editorProcessKeypress(&E);
|
||||
editorRefreshScreen();
|
||||
editorProcessKeypress();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user