Merge remote-tracking branch 'origin/pr/3323'
This commit is contained in:
commit
94b2a41ed7
@ -1235,6 +1235,11 @@ tabs.padding:
|
||||
type: Padding
|
||||
desc: Padding (in pixels) around text for tabs.
|
||||
|
||||
tabs.persist_mode_on_change:
|
||||
default: false
|
||||
type: Bool
|
||||
desc: When switching tabs, retain the current mode.
|
||||
|
||||
tabs.position:
|
||||
default: top
|
||||
type: Position
|
||||
|
@ -652,9 +652,11 @@ class TabbedBrowser(tabwidget.TabWidget):
|
||||
|
||||
log.modes.debug("Current tab changed, focusing {!r}".format(tab))
|
||||
tab.setFocus()
|
||||
for mode in [usertypes.KeyMode.hint, usertypes.KeyMode.insert,
|
||||
usertypes.KeyMode.caret, usertypes.KeyMode.passthrough]:
|
||||
modeman.leave(self._win_id, mode, 'tab changed', maybe=True)
|
||||
if not config.val.tabs.persist_mode_on_change:
|
||||
for mode in [usertypes.KeyMode.hint, usertypes.KeyMode.insert,
|
||||
usertypes.KeyMode.caret,
|
||||
usertypes.KeyMode.passthrough]:
|
||||
modeman.leave(self._win_id, mode, 'tab changed', maybe=True)
|
||||
if self._now_focused is not None:
|
||||
objreg.register('last-focused-tab', self._now_focused, update=True,
|
||||
scope='window', window=self._win_id)
|
||||
|
Loading…
Reference in New Issue
Block a user