From 21fc848839b6ae7502ff97b72fa87edc8013133d 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 893bbfd38..a8ffedc01 100644 --- a/qutebrowser/browser/browsertab.py +++ b/qutebrowser/browser/browsertab.py @@ -98,6 +98,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 4c8a81df3..59e566a5a 100644 --- a/qutebrowser/mainwindow/tabbedbrowser.py +++ b/qutebrowser/mainwindow/tabbedbrowser.py @@ -653,6 +653,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