From 5254f8ab9b8be084a18c376774b8bebe4eb20173 Mon Sep 17 00:00:00 2001 From: pommicket Date: Thu, 23 Mar 2023 12:33:18 -0400 Subject: fix crash on :previous-position with no active buffer --- command.c | 3 ++- main.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/command.c b/command.c index 0bad2a6..a384050 100644 --- a/command.c +++ b/command.c @@ -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: { diff --git a/main.c b/main.c index d3cdbed..d3038f6 100644 --- a/main.c +++ b/main.c @@ -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 -- cgit v1.2.3