beautify code as requested
This commit is contained in:
parent
5992688926
commit
7c2802e843
@ -635,10 +635,9 @@ class TabbedBrowser(tabwidget.TabWidget):
|
|||||||
def on_mode_entered(self, mode):
|
def on_mode_entered(self, mode):
|
||||||
"""Save input mode when tabs.mode_on_change = restore."""
|
"""Save input mode when tabs.mode_on_change = restore."""
|
||||||
input_modes = [usertypes.KeyMode.insert, usertypes.KeyMode.passthrough]
|
input_modes = [usertypes.KeyMode.insert, usertypes.KeyMode.passthrough]
|
||||||
if (mode in input_modes and
|
if mode in input_modes and config.val.tabs.mode_on_change == 'restore':
|
||||||
config.val.tabs.mode_on_change == 'restore'):
|
|
||||||
tab = self.currentWidget()
|
tab = self.currentWidget()
|
||||||
if tab and tab is not None:
|
if tab is not None:
|
||||||
tab.data.input_mode = mode
|
tab.data.input_mode = mode
|
||||||
|
|
||||||
@pyqtSlot(usertypes.KeyMode)
|
@pyqtSlot(usertypes.KeyMode)
|
||||||
@ -654,7 +653,7 @@ class TabbedBrowser(tabwidget.TabWidget):
|
|||||||
widget.setFocus()
|
widget.setFocus()
|
||||||
elif config.val.tabs.mode_on_change == 'restore':
|
elif config.val.tabs.mode_on_change == 'restore':
|
||||||
tab = self.currentWidget()
|
tab = self.currentWidget()
|
||||||
if tab and tab is not None:
|
if tab is not None:
|
||||||
tab.data.input_mode = usertypes.KeyMode.normal
|
tab.data.input_mode = usertypes.KeyMode.normal
|
||||||
|
|
||||||
@pyqtSlot(int)
|
@pyqtSlot(int)
|
||||||
|
Loading…
Reference in New Issue
Block a user