diff options
author | cflip <cflip@cflip.net> | 2023-01-16 10:48:09 -0700 |
---|---|---|
committer | cflip <cflip@cflip.net> | 2023-01-16 10:48:09 -0700 |
commit | 617db1d87703e929390a3ea04d189a25c4aaa026 (patch) | |
tree | a768632f80a8c5b4d9b1192eaa553c4cb2505278 /editor.c | |
parent | 24232e191a16015509b444fcee771b2f0cb1478b (diff) |
Implement some more commands from vim
Diffstat (limited to 'editor.c')
-rw-r--r-- | editor.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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; |