Command completions for `:bind` and `:` will now show bindings for
aliases. The binding is only included if it is bound to that alias, not
if it is bound to the command the alias points to.
Returning a defaultdict made the caller's code look confusing, as it
wasn't clear why there wouldn't be a Keyerror in some cases. Instead,
let the caller explicitly use `get`.
Consolidate the logic used to generate the command completion category
into one place. This is shared by CommandCompletionModel,
HelpCompletionModel, and BindCompletionModel.
Hidden commands are not shown in command completion as they typically
would not be run directly. However, a user might still might like to see
help for them if, for example, they are writing a script or creating a
binding.
Addresses #1707.
- Prepare CLI options to pytest 3.0, to avoid a deprecation warning.
- Fix error due to missing CHANGES.rst when creating the source
distribution by adding a MANIFEST.in.
Various code (like src2asciidoc.py) relies on all @cmdutils.register
decorators being called when qutebrowser.app is imported.
Moving the keyconf import to _init_key_config broke that assumption, as
keyconf isn't imported anywhere anymore - which caused :bind and :unbind
to vanish from the generated documentation.
In the long run we should perhaps use venusian:
http://docs.pylonsproject.org/projects/venusian/
But for now, this is the easiest solution.
This means we don't get a QProcess message because of test_no_loglines
not sending :quit, and we don't need to do so in test_ascii_locale as
there's nothing we need to wait for.
Wire up the config change event to update command completion on
changing aliases, so the new aliases will be included.
Fixes#1814.
Currently we do not have tests at a high enough level to test whether
signals are wired up correctly to update completions.
This adds the ability to open new tabs in the last-focused window
instead, which fixes#1801.
Right now the only other option is probably not that useful for human
users but it's required to make tests behave deterministically and
consistently. (But with #881 on the roadmap, I would implement this as
another choice)
To this end, also make the test framework set this option to preserve
the invariant against which existing tests are written: that spawning a
new window would effectively also focus it.
This was currently almost completely broken, yet nobody complained. The
new behavior (in the previous commit) makes this always hide the mouse
cursor, even when an input field has focus.
Since the only two easy options to implement are "never hide" and
"always hide", combined with the fact that both are sort of useless to
an end-user, just remove the option until somebody wants it back.
Right now, get('last-focused-main-window') essentially returns the same
as qApp.activeWindow(), since it's None when no window is focused. This
seems somewhat contrary to its original intent, so I've changed it to
only ever update the object.
This actually fixes another bug as well: on_focus_changed's new is not
always a MainWindow - in fact it's a WebView on my end. To fix this,
directly use the QApplication.activeWindow() to find the current focus.
That second bit in particular actually some related bugs that probably
nobody ever noticed or bothered reporting:
* _maybe_hide_mouse_cursor currently pretty much never gets called
* :adblock-update doesn't actually show any downloads
* ... probably more