document code a bit more

This commit is contained in:
Marc Jauvin 2018-01-14 13:29:51 -05:00
parent a7db197e45
commit 21fc848839
2 changed files with 2 additions and 0 deletions

View File

@ -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)

View File

@ -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