diff options
author | pommicket <pommicket@gmail.com> | 2023-03-27 16:40:54 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-03-27 16:40:54 -0400 |
commit | 2794f396484bc8f1fb29190478c668cda22ce22d (patch) | |
tree | 61510311aa6572d61d14a1a6ea11391a9f65f8ea | |
parent | 372cc3bac0d7f33eb2f42c1f1fd9a8c79644cf9f (diff) |
fix crash on in/decrement-number & insert-text w no active buffer
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | command.c | 16 | ||||
-rw-r--r-- | control | 2 | ||||
-rw-r--r-- | ted.h | 2 |
4 files changed, 11 insertions, 10 deletions
@@ -315,6 +315,7 @@ Then, open windows\_installer\\ted\\ted.sln, and build. <tr><td>2.0</td> <td>LSP support and a bunch of other things.</td> <td>2023 Jan 11</td></tr> <tr><td>2.1</td> <td>Better interaction between path+language specific settings, themes, and other things.</td> <td>2023 Mar 7</td></tr> <tr><td>2.2</td> <td>Keyboard macros</td> <td>2023 Mar 23</td></tr> +<tr><td>2.2r1</td> <td>Minor bug fixes</td> <td>2023 Mar 27</td></tr> </table> ## License @@ -179,13 +179,6 @@ void command_execute_ex(Ted *ted, Command c, CommandArgument full_argument, Comm case CMD_NOOP: break; - case CMD_INCREMENT_NUMBER: - buffer_change_number_at_cursor(buffer, argument); - break; - case CMD_DECREMENT_NUMBER: - buffer_change_number_at_cursor(buffer, -argument); - break; - case CMD_LEFT: if (buffer) buffer_cursor_move_left(buffer, argument); autocomplete_close(ted); @@ -302,7 +295,7 @@ void command_execute_ex(Ted *ted, Command c, CommandArgument full_argument, Comm case CMD_INSERT_TEXT: { const char *str = argument_str; - if (str) { + if (str && buffer) { buffer_insert_utf8_at_cursor(buffer, str); } } @@ -370,6 +363,13 @@ void command_execute_ex(Ted *ted, Command c, CommandArgument full_argument, Comm case CMD_DELETE_WORD: if (buffer) buffer_delete_words_at_cursor(buffer, argument); break; + case CMD_INCREMENT_NUMBER: + if (buffer) buffer_change_number_at_cursor(buffer, argument); + break; + case CMD_DECREMENT_NUMBER: + if (buffer) buffer_change_number_at_cursor(buffer, -argument); + break; + case CMD_PAGE_DOWN: if (buffer) buffer_page_down(buffer, argument); @@ -1,5 +1,5 @@ Package: ted -Version: 2.2 +Version: 2.2r1 Section: text Priority: optional Architecture: amd64 @@ -28,7 +28,7 @@ extern "C" { #include "sdl-inc.h" /// Version number -#define TED_VERSION "2.2" +#define TED_VERSION "2.2r1" /// Version string #define TED_VERSION_FULL "ted v. " TED_VERSION /// Maximum path size ted handles. |