From e90fac2c2f9e972d41bfea5f4ff2b4eb7e51484f Mon Sep 17 00:00:00 2001 From: night0721 Date: Sat, 9 Mar 2024 19:52:22 +0000 Subject: [PATCH] added keybinding for 'G' to scroll to end of list --- ccc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ccc.c b/ccc.c index 9d71753..6bc1c7a 100644 --- a/ccc.c +++ b/ccc.c @@ -99,6 +99,10 @@ int main(int argc, char** argv) } highlight_current_line(); break; + case 'G': + current_selection = files_len() - 1; + highlight_current_line(); + break; case 27: // esc break; case KEY_RESIZE: @@ -184,6 +188,7 @@ void show_file_content() FILE *file = fopen(get_filename((long) current_selection), "rb"); if (file) { + wclear(windows[1].window); fseek(file, 0, SEEK_END); long length = ftell(file); fseek(file, 0, SEEK_SET);