summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-03-02 16:58:54 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-03-02 17:00:50 -0500
commit64bfab15c19ef0e0055b7b80b315a872b8946ce4 (patch)
tree127262140ebe8008c10e16e5009e1b8257bc9ced /menu.c
parent3600ff8d24ea87a0b63e4931010e0dd52232246c (diff)
start command selector
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/menu.c b/menu.c
index 19053ab..79b597e 100644
--- a/menu.c
+++ b/menu.c
@@ -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;
}
}