summaryrefslogtreecommitdiff
path: root/command.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-04-16 16:25:03 -0400
committerLeo Tenenbaum <pommicket@gmail.com>2021-04-16 16:25:03 -0400
commitd76fb30c7f8e073dd17180752dbd56dfa62511d3 (patch)
tree9bd5ad978a54e00f6539fdb7d5f5d23e2aefeac5 /command.c
parent51ac447d409bb565178ab9d78d4b5200e89f2cf4 (diff)
command history for :shell
Diffstat (limited to 'command.c')
-rw-r--r--command.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/command.c b/command.c
index c28bce5..b706b2d 100644
--- a/command.c
+++ b/command.c
@@ -50,10 +50,14 @@ void command_execute(Ted *ted, Command c, i64 argument) {
break;
case CMD_UP:
if (ted->selector_open) selector_up(ted, ted->selector_open, argument);
+ else if (ted->menu == MENU_SHELL && buffer == &ted->line_buffer)
+ menu_shell_up(ted);
else if (buffer) buffer_cursor_move_up(buffer, argument);
break;
case CMD_DOWN:
if (ted->selector_open) selector_down(ted, ted->selector_open, argument);
+ else if (ted->menu == MENU_SHELL && buffer == &ted->line_buffer)
+ menu_shell_down(ted);
else if (buffer) buffer_cursor_move_down(buffer, argument);
break;
case CMD_SELECT_LEFT: