browser: press r to reload page
This commit is contained in:
parent
8830465fbf
commit
34f7ef0a95
|
@ -74,6 +74,8 @@ class Browser:
|
||||||
running = False
|
running = False
|
||||||
elif char == ord(":"):
|
elif char == ord(":"):
|
||||||
self.quick_command("")
|
self.quick_command("")
|
||||||
|
elif char == ord("r"):
|
||||||
|
self.reload_page()
|
||||||
elif char == ord("s"):
|
elif char == ord("s"):
|
||||||
self.set_status(f"h {self.h} w {self.w}")
|
self.set_status(f"h {self.h} w {self.w}")
|
||||||
elif char == ord("h"):
|
elif char == ord("h"):
|
||||||
|
@ -413,6 +415,10 @@ class Browser:
|
||||||
if self.page.scroll_h(by_columns, self.w):
|
if self.page.scroll_h(by_columns, self.w):
|
||||||
self.refresh_page()
|
self.refresh_page()
|
||||||
|
|
||||||
|
def reload_page(self):
|
||||||
|
if self.current_url:
|
||||||
|
self.open_gemini_url(self.current_url, history=False)
|
||||||
|
|
||||||
def go_back(self):
|
def go_back(self):
|
||||||
"""Go back in history if possible."""
|
"""Go back in history if possible."""
|
||||||
if self.history.has_links():
|
if self.history.has_links():
|
||||||
|
|
Reference in a new issue