summaryrefslogtreecommitdiff
path: root/editor.c
diff options
context:
space:
mode:
Diffstat (limited to 'editor.c')
-rw-r--r--editor.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/editor.c b/editor.c
index 9f51188..016fa2e 100644
--- a/editor.c
+++ b/editor.c
@@ -140,6 +140,19 @@ void editor_delete_char(struct editor_state* editor)
}
}
+void editor_add_line_above(struct editor_state* editor)
+{
+ insert_row(editor, editor->cursor_y, "", 0);
+ editor->cursor_x = 0;
+}
+
+void editor_add_line_below(struct editor_state* editor)
+{
+ insert_row(editor, editor->cursor_y + 1, "", 0);
+ editor->cursor_y++;
+ editor->cursor_x = 0;
+}
+
static void editor_find_callback(struct editor_state* editor, char* query, int key)
{
static int last_match = -1;