tCreate function to deinitialize editor and call it at exit - ve - a minimal te… | |
git clone git://src.adamsgaard.dk/ve | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit dce7e854fa36dd6392e73c208140c570644ad7dc | |
parent c25ff23d7f5f66ccd5b8053de791388c3a6b311a | |
Author: Anders Damsgaard <[email protected]> | |
Date: Wed, 7 Aug 2019 09:53:44 +0200 | |
Create function to deinitialize editor and call it at exit | |
Diffstat: | |
M main.c | 1 + | |
M row.h | 1 + | |
M terminal.c | 23 ----------------------- | |
3 files changed, 2 insertions(+), 23 deletions(-) | |
--- | |
diff --git a/main.c b/main.c | |
t@@ -1,3 +1,4 @@ | |
+#include <stdlib.h> | |
#include "terminal.h" | |
#include "output.h" | |
#include "input.h" | |
diff --git a/row.h b/row.h | |
t@@ -11,5 +11,6 @@ void editor_row_insert(int i, char *s, size_t len); | |
void editor_row_insert_char(eRow *row, int i, int c); | |
void editor_row_delete_char(eRow *row, int i); | |
void editor_row_delete(int i); | |
+void editor_row_free(eRow *row); | |
#endif | |
diff --git a/terminal.c b/terminal.c | |
t@@ -105,26 +105,3 @@ get_window_size(int *rows, int *cols) | |
return 0; | |
} | |
} | |
- | |
-/* set editor state variables, make room for status */ | |
-void | |
-init_editor() { | |
- E.cursor_x = 0; | |
- E.cursor_y = 0; | |
- E.cursor_rx = 0; | |
- E.mode = 0; | |
- E.num_rows = 0; | |
- E.row = NULL; | |
- E.row_offset = 0; | |
- E.column_offset = 0; | |
- E.filename = NULL; | |
- E.status_msg[0] = '\0'; | |
- E.status_msg_time = 0; | |
- E.show_status = 0; | |
- E.file_changed = 0; | |
- E.find_query = NULL; | |
- | |
- if (get_window_size(&E.screen_rows, &E.screen_columns) == -1) | |
- die("get_window_size"); | |
- E.screen_rows -= 1; | |
-} |