summaryrefslogtreecommitdiff
path: root/editor.h
diff options
context:
space:
mode:
authorcflip <cflip@cflip.net>2023-01-17 10:39:21 -0700
committercflip <cflip@cflip.net>2023-01-17 10:39:21 -0700
commit1a416a917d74d956469e6e80cf4bb519e9474c91 (patch)
tree6e61b15d9cece1af0a64d3a9cd2a5d5dd73815b7 /editor.h
parent8be3915417bcafdbf2a8752980db96e06df096aa (diff)
Rename 'rows' to 'lines' everywhere
For whatever reason lines were called rows in the code, so this refactor changes that name everywhere. The name 'row' is still used in some places to refer to the unit of height in the screen.
Diffstat (limited to 'editor.h')
-rw-r--r--editor.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/editor.h b/editor.h
index 0fe8bab..a46c37f 100644
--- a/editor.h
+++ b/editor.h
@@ -2,7 +2,9 @@
#define _EDITOR_H
#include <time.h>
+
#include "buffer.h"
+#include "line.h"
enum editor_mode {
EDITOR_MODE_NORMAL,
@@ -13,12 +15,12 @@ enum editor_mode {
struct editor_state {
int cursor_x, cursor_y;
int cursor_display_x;
- int row_offset;
+ int line_offset;
int col_offset;
int screen_rows;
int screen_cols;
- int row_count;
- struct editor_row* rows;
+ int num_lines;
+ line_t *lines;
int dirty;
char* filename;
char status_message[80];
@@ -42,6 +44,7 @@ void editor_move_left(struct editor_state *);
void editor_move_right(struct editor_state *);
void editor_move_up(struct editor_state *);
void editor_move_down(struct editor_state *);
+void editor_move_end(struct editor_state *);
void editor_insert_char(struct editor_state* editor, int c);
void editor_insert_newline(struct editor_state* editor);