summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
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;
}
}