diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-03-02 16:58:54 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-03-02 17:00:50 -0500 |
commit | 64bfab15c19ef0e0055b7b80b315a872b8946ce4 (patch) | |
tree | 127262140ebe8008c10e16e5009e1b8257bc9ced /menu.c | |
parent | 3600ff8d24ea87a0b63e4931010e0dd52232246c (diff) |
start command selector
Diffstat (limited to 'menu.c')
-rw-r--r-- | menu.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -26,6 +26,10 @@ static void menu_close(Ted *ted) { case MENU_GOTO_LINE: buffer_clear(&ted->line_buffer); break; + case MENU_COMMAND_SELECTOR: + buffer_clear(&ted->line_buffer); + buffer_clear(&ted->argument_buffer); + break; } ted->menu = MENU_NONE; ted->selector_open = NULL; @@ -66,6 +70,10 @@ static void menu_open(Ted *ted, Menu menu) { case MENU_GOTO_LINE: ted_switch_to_buffer(ted, &ted->line_buffer); break; + case MENU_COMMAND_SELECTOR: + ted_switch_to_buffer(ted, &ted->line_buffer); + buffer_insert_char_at_cursor(&ted->argument_buffer, '1'); + break; } } |