summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/changelog.asciidoc13
-rw-r--r--qutebrowser/config/configfiles.py14
2 files changed, 25 insertions, 2 deletions
diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc
index de6a2f33e..dd183a29c 100644
--- a/doc/changelog.asciidoc
+++ b/doc/changelog.asciidoc
@@ -15,6 +15,19 @@ breaking changes (such as renamed commands) can happen in minor releases.
// `Fixed` for any bug fixes.
// `Security` to invite users to upgrade in case of vulnerabilities.
+v1.9.0 (unreleased)
+-------------------
+
+Fixed
+~~~~~
+
+- dictcli.py now works correctly on Windows again.
+- Unbinding keys via `config.bind(key, None)` accidentally worked in
+ v1.7.0 but raises an exception in v1.8.0. It now works again, but is
+ deprecated and shows an error. Note that `:config-py-write` did write
+ such invalid lines before v1.8.0, so existing config files might need
+ adjustments.
+
v1.8.1 (2019-09-27)
-------------------
diff --git a/qutebrowser/config/configfiles.py b/qutebrowser/config/configfiles.py
index e7066fa11..f220d2ca4 100644
--- a/qutebrowser/config/configfiles.py
+++ b/qutebrowser/config/configfiles.py
@@ -442,11 +442,21 @@ class ConfigAPI:
urlpattern = urlmatch.UrlPattern(pattern) if pattern else None
self._config.set_obj(name, value, pattern=urlpattern)
- def bind(self, key: str, command: str, mode: str = 'normal') -> None:
+ def bind(self, key: str,
+ command: typing.Optional[str],
+ mode: str = 'normal') -> None:
"""Bind a key to a command, with an optional key mode."""
with self._handle_error('binding', key):
seq = keyutils.KeySequence.parse(key)
- self._keyconfig.bind(seq, command, mode=mode)
+ if command is None:
+ text = ("Unbinding commands with config.bind('{key}', None) "
+ "is deprecated. Use config.unbind('{key}') instead."
+ .format(key=key))
+ self.errors.append(configexc.ConfigErrorDesc(
+ "While unbinding '{}'".format(key), text))
+ self._keyconfig.unbind(seq, mode=mode)
+ else:
+ self._keyconfig.bind(seq, command, mode=mode)
def unbind(self, key: str, mode: str = 'normal') -> None:
"""Unbind a key from a command, with an optional key mode."""