Commit Diff


commit - 99a9e11d5ba1d5152c84c897a9ff1ac1ec0a3ada
commit + 661233ed8fe24a6c2a2cc74cfb5628aaa9737aa2
blob - e80e185bbb92338663cd98f8559be37a6d17d3fb
blob + d8df75d4f04bc1cd10bbcbd2ec0cfbcad6d8044e
--- ChangeLog
+++ ChangeLog
@@ -1,5 +1,10 @@
 2021-07-14  Omar Polo  <op@omarpolo.com>
 
+	* defaults.c (load_default_keys): bind f5 to reload-page
+	(load_default_keys): bind r to reload-page
+
+	* cmd.c (cmd_reload_page): add reload-page
+
 	* defaults.c (load_default_keys): <up> and <down> are now bound to previous/next-completion instead of previous/next-history-item
 	(load_default_keys): bind < to load-current-url
 
blob - 12e95ebd29df9734971d34d7c93c8322097f0f18
blob + 381ab9a8a8c225467b2b9f104565207158c02607
--- cmd.c
+++ cmd.c
@@ -507,6 +507,15 @@ cmd_load_current_url(struct buffer *buffer)
 }
 
 void
+cmd_reload_page(struct buffer *buffer)
+{
+	struct tab *tab;
+
+	tab = current_tab();
+	load_url_in_tab(tab, tab->hist_cur->h);
+}
+
+void
 cmd_bookmark_page(struct buffer *buffer)
 {
 	struct tab *tab = current_tab();
blob - aefb7449c00ddc4a6c2a3df0770ae08df7cb1cf8
blob + 5014678193e118a6328f1ee8d1cfb78ef056bdc8
--- cmd.h
+++ cmd.h
@@ -49,6 +49,7 @@ CMD(cmd_tab_move);
 CMD(cmd_tab_move_to);
 CMD(cmd_load_url);
 CMD(cmd_load_current_url);
+CMD(cmd_reload_page);
 CMD(cmd_bookmark_page);
 CMD(cmd_list_bookmarks);
 CMD(cmd_toggle_help);
blob - f790cdc3e0637d7be42cf02c91214ebe4edfc7eb
blob + 145e8b461d949d4bdac18575810c4c80b0c9a7b2
--- defaults.c
+++ defaults.c
@@ -302,6 +302,9 @@ load_default_keys(void)
 	global_set_key("M-<left>",	cmd_previous_page);
 	global_set_key("M-<right>",	cmd_next_page);
 
+	global_set_key("<f5>",		cmd_reload_page);
+	global_set_key("r",		cmd_reload_page);
+
 	/* "ncurses standard" */
 	global_set_key("C-l",		cmd_redraw);
 
blob - 62935db31e66aa838f5044a5cc05005dc1f82ef7
blob + 2e19de1e04921287f262300bf38b722a10a7dc15
--- telescope.1
+++ telescope.1
@@ -282,6 +282,10 @@ tab-next
 previous-page
 .It M-<right>
 next-page
+.It <f5>
+reload-page
+.It r
+reload-page
 .El
 .Ss Neither Emacs nor vi specific
 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
@@ -448,6 +452,8 @@ Follow the link on the current line on a new tab.
 .It Ic redraw
 Redraw the screen, useful if some background program messed up the
 display.
+.It Ic reload-page
+Reload the current page.
 .It Ic scroll-down
 Scroll down by one visual page.
 .It Ic scroll-line-down