Dedent code in :undo

This commit is contained in:
Florian Bruhin 2020-07-28 20:27:07 +02:00
parent 858bf65b54
commit 2433dbc4b7
1 changed files with 4 additions and 3 deletions

View File

@ -789,11 +789,12 @@ class CommandDispatcher:
count: How deep in the undo stack to find the tab or tabs to
re-open.
"""
if window and count != 1:
raise cmdutils.CommandError(
":undo --window does not support a count")
try:
if window:
if count != 1:
raise cmdutils.CommandError(
":undo --window does not support a count")
windowundo.instance.undo_last_window_close()
else:
self._tabbed_browser.undo(count)