diff options
author | pommicket <pommicket@gmail.com> | 2023-03-23 12:33:18 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-03-23 12:33:18 -0400 |
commit | 5254f8ab9b8be084a18c376774b8bebe4eb20173 (patch) | |
tree | 794162788cfee1fb3143e107e4e9067f2fe58c63 | |
parent | 3e4c6c976ce17324bc689c39790740f1e6761f36 (diff) |
fix crash on :previous-position with no active buffer
-rw-r--r-- | command.c | 3 | ||||
-rw-r--r-- | main.c | 3 |
2 files changed, 5 insertions, 1 deletions
@@ -267,7 +267,8 @@ void command_execute(Ted *ted, Command c, i64 argument) { autocomplete_close(ted); break; case CMD_PREVIOUS_POSITION: - buffer_cursor_move_to_prev_pos(buffer); + if (buffer) + buffer_cursor_move_to_prev_pos(buffer); break; case CMD_INSERT_TEXT: { @@ -1,4 +1,7 @@ /* +@TODO: +- scroll to cursor when text is typed +- some rust error locations arent detected? FUTURE FEATURES: - better undo chaining (dechain on backspace?) - font setting & support for multiple fonts to cover more characters |