From b58cfead05b201c3664fde8657556c5b260a9e6a Mon Sep 17 00:00:00 2001 From: "mhm@mhm.com" Date: Thu, 30 Nov 2017 16:05:01 +0100 Subject: [PATCH] style fixed --- qutebrowser/browser/qutescheme.py | 4 ++-- qutebrowser/html/back.html | 5 +++-- qutebrowser/misc/sessions.py | 10 +++++----- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/qutebrowser/browser/qutescheme.py b/qutebrowser/browser/qutescheme.py index 9771f6db1..247e12a78 100644 --- a/qutebrowser/browser/qutescheme.py +++ b/qutebrowser/browser/qutescheme.py @@ -433,8 +433,8 @@ def qute_back(url): Simple page to free ram / lazy load a site, goes back on focusing the tab. """ html = jinja.render( - 'back.html', - title='Suspended: ' + urllib.parse.unquote(url.fragment())) + 'back.html', + title='Suspended: ' + urllib.parse.unquote(url.fragment())) return 'text/html', html diff --git a/qutebrowser/html/back.html b/qutebrowser/html/back.html index 94d16824e..b6190feda 100644 --- a/qutebrowser/html/back.html +++ b/qutebrowser/html/back.html @@ -8,13 +8,14 @@ function switch_state(new_state) { history.replaceState( new_state, document.title, - location.pathname+location.hash); + location.pathname + location.hash); } function go_back() { switch_state(STATE_FORWARD); history.back(); } + function go_forward() { switch_state(STATE_BACK); history.forward(); @@ -49,5 +50,5 @@ switch (history.state) { {% block content %} -

If you see this site something went wrong or you reached the end of the history or you disabled javascript.

+

If you see this site something went wrong, or you reached the end of the history, or you disabled javascript.

{% endblock %} diff --git a/qutebrowser/misc/sessions.py b/qutebrowser/misc/sessions.py index 1b0106f1b..237e46189 100644 --- a/qutebrowser/misc/sessions.py +++ b/qutebrowser/misc/sessions.py @@ -336,11 +336,11 @@ class SessionManager(QObject): # -> dropwhile empty if not session.lazy_session lazy_index = len(data['history']) gen = itertools.chain( - itertools.takewhile(lambda _: not lazy_load, - enumerate(data['history'])), - enumerate(lazy_load), - itertools.dropwhile(lambda i: i[0] < lazy_index, - enumerate(data['history']))) + itertools.takewhile(lambda _: not lazy_load, + enumerate(data['history'])), + enumerate(lazy_load), + itertools.dropwhile(lambda i: i[0] < lazy_index, + enumerate(data['history']))) for i, histentry in gen: user_data = {}