diff options
author | pommicket <pommicket@gmail.com> | 2023-03-23 15:40:43 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-03-23 15:40:43 -0400 |
commit | 6643ff4c14cc27bf80189aadaf65c36ac2e7307f (patch) | |
tree | 4c2655192551a0298378024e24470e83776cddb5 /command.c | |
parent | f47b513f8ac32d5eeebc1de187232c99751562a2 (diff) |
increment-number and decrement-number
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -100,6 +100,8 @@ static CommandName command_names[] = { {"macro-record", CMD_MACRO_RECORD}, {"macro-stop", CMD_MACRO_STOP}, {"macro-execute", CMD_MACRO_EXECUTE}, + {"increment-number", CMD_INCREMENT_NUMBER}, + {"decrement-number", CMD_DECREMENT_NUMBER}, }; static_assert_if_possible(arr_count(command_names) == CMD_COUNT) @@ -177,6 +179,13 @@ 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); |