Try to fix _back_forward

This commit is contained in:
Florian Bruhin 2016-06-14 15:42:32 +02:00
parent 7319ced0bc
commit 56852821e8

View File

@ -356,6 +356,7 @@ class CommandDispatcher:
newtab.keep_icon = True newtab.keep_icon = True
newtab.set_zoom_factor(curtab.zoom_factor()) newtab.set_zoom_factor(curtab.zoom_factor())
newtab.history.deserialize(curtab.history.serialize()) newtab.history.deserialize(curtab.history.serialize())
return newtab
@cmdutils.register(instance='command-dispatcher', scope='window') @cmdutils.register(instance='command-dispatcher', scope='window')
def tab_detach(self): def tab_detach(self):
@ -381,13 +382,13 @@ class CommandDispatcher:
for _ in range(count): for _ in range(count):
if forward: if forward:
if not history.can_go_forward(): if not widget.history.can_go_forward():
raise cmdexc.CommandError("At end of history.") raise cmdexc.CommandError("At end of history.")
history.forward() widget.history.forward()
else: else:
if not history.can_go_back(): if not widget.history.can_go_back():
raise cmdexc.CommandError("At beginning of history.") raise cmdexc.CommandError("At beginning of history.")
history.back() widget.history.back()
@cmdutils.register(instance='command-dispatcher', scope='window') @cmdutils.register(instance='command-dispatcher', scope='window')
@cmdutils.argument('count', count=True) @cmdutils.argument('count', count=True)