From c150c5481a093a14c42ef1233cc54214972bc381 Mon Sep 17 00:00:00 2001 From: "mhm@mhm.com" Date: Sat, 18 Nov 2017 13:46:50 +0100 Subject: [PATCH] lazy sessions, dont save qute://back --- qutebrowser/misc/sessions.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qutebrowser/misc/sessions.py b/qutebrowser/misc/sessions.py index da49205df..807d4bde4 100644 --- a/qutebrowser/misc/sessions.py +++ b/qutebrowser/misc/sessions.py @@ -205,7 +205,11 @@ class SessionManager(QObject): for idx, item in enumerate(tab.history): qtutils.ensure_valid(item) item_data = self._save_tab_item(tab, idx, item) - data['history'].append(item_data) + if item_data['url'].startswith('qute://back'): + if 'active' in item_data and data['history']: + data['history'][-1]['active'] = item_data.get('active', False) + else: + data['history'].append(item_data) return data def _save_all(self, *, only_window=None, with_private=False):