From 662d1cf20227fa86fd93e3269b62b01dc26d42c7 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 26 Nov 2021 21:54:45 -0800 Subject: support space/backspace in recent changes view --- src/lua.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/lua.c b/src/lua.c index 4f5e2ca..615f92c 100644 --- a/src/lua.c +++ b/src/lua.c @@ -528,16 +528,16 @@ static void recent_changes_menu (int cursor, int history_array_size) { extern int menu_column; menu_column = 2; draw_menu_item("Esc", "go back"); - /* draw_menu_item("↓", "older"); */ + /* draw_menu_item("↓/space", "older"); */ attroff(A_REVERSE); - mvaddstr(LINES-1, menu_column, " ↓ "); - menu_column += 3; /* strlen isn't sufficient */ + mvaddstr(LINES-1, menu_column, " ↓/space "); + menu_column += 9; /* strlen isn't sufficient */ attron(A_REVERSE); draw_string_on_menu("older"); - /* draw_menu_item("↑", "newer"); */ + /* draw_menu_item("↑/backspace", "newer"); */ attroff(A_REVERSE); - mvaddstr(LINES-1, menu_column, " ↑ "); - menu_column += 3; /* strlen isn't sufficient */ + mvaddstr(LINES-1, menu_column, " ↑/backspace "); + menu_column += 13; /* strlen isn't sufficient */ attron(A_REVERSE); draw_string_on_menu("newer"); draw_menu_item("^e", "edit/add note"); @@ -685,9 +685,11 @@ void recent_changes (lua_State *L) { quit = 1; break; case KEY_DOWN: + case ' ': if (cursor > 1) --cursor; break; case KEY_UP: + case KEY_BACKSPACE: if (cursor < history_array_size) ++cursor; break; case CTRL_E: -- cgit 1.4.1-2-gfad0