From 1a416a917d74d956469e6e80cf4bb519e9474c91 Mon Sep 17 00:00:00 2001 From: cflip Date: Tue, 17 Jan 2023 10:39:21 -0700 Subject: 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. --- editor.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'editor.h') 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 + #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); -- cgit v1.2.3