diff options
author | Jimmy <jimmy@spalge.com> | 2019-05-26 13:04:50 +1200 |
---|---|---|
committer | Jimmy <jimmy@spalge.com> | 2020-07-13 13:14:48 +1200 |
commit | 4071317df1e12f0ad927c910334a808bbd8737ee (patch) | |
tree | 3b5e9d071d632538ed5d230930f169c72eac508b /qutebrowser/app.py | |
parent | 57a4e76252f5c49923149da9888aae4e7bc96fc4 (diff) | |
download | qutebrowser-4071317df1e12f0ad927c910334a808bbd8737ee.tar.gz qutebrowser-4071317df1e12f0ad927c910334a808bbd8737ee.zip |
Add --window argument to :undo.
I don't like using `QApplication.instance()` and then calling methods
that aren't defined for a `QApplication` on it. We need to sort our
module heirarchy out though because there would be an import loop from
importing app here.
Diffstat (limited to 'qutebrowser/app.py')
-rw-r--r-- | qutebrowser/app.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/qutebrowser/app.py b/qutebrowser/app.py index a1e633ff5..d9fcbfa0d 100644 --- a/qutebrowser/app.py +++ b/qutebrowser/app.py @@ -533,8 +533,11 @@ class Application(QApplication): tab_stack=window.tabbed_browser._undo_stack, )) - @cmdutils.register(instance='app') def undo_last_window_close(self): + """Restore the last window to be closed. + + It will have the same tab and undo stack as when it was closed. + """ event = self._undos.pop() window = mainwindow.MainWindow( private=event.private, |