From 81b85994a12dd2cbf19b6b118496743eb6f7135b Mon Sep 17 00:00:00 2001 From: Marc Jauvin Date: Sun, 14 Jan 2018 13:29:51 -0500 Subject: [PATCH] document code a bit more --- qutebrowser/browser/browsertab.py | 1 + qutebrowser/mainwindow/tabbedbrowser.py | 1 + 2 files changed, 2 insertions(+) diff --git a/qutebrowser/browser/browsertab.py b/qutebrowser/browser/browsertab.py index 9b59f64fc..c9d2f540a 100644 --- a/qutebrowser/browser/browsertab.py +++ b/qutebrowser/browser/browsertab.py @@ -99,6 +99,7 @@ class TabData: Only used for QtWebKit. pinned: Flag to pin the tab. fullscreen: Whether the tab has a video shown fullscreen currently. + input_mode: current input mode for the tab. (insert, passthrough, normal) """ keep_icon = attr.ib(False) diff --git a/qutebrowser/mainwindow/tabbedbrowser.py b/qutebrowser/mainwindow/tabbedbrowser.py index 9c140f8a7..896e2f8ab 100644 --- a/qutebrowser/mainwindow/tabbedbrowser.py +++ b/qutebrowser/mainwindow/tabbedbrowser.py @@ -651,6 +651,7 @@ class TabbedBrowser(tabwidget.TabWidget): return if self._now_focused and config.val.tabs.mode_on_change == 'restore': current_mode = modeman.instance(self._win_id).mode + # only save insert & passthrough mode. otherwise default to normal if not current_mode in (usertypes.KeyMode.insert,usertypes.KeyMode.passthrough): current_mode = usertypes.KeyMode.normal self._now_focused.data.input_mode = current_mode