diff --git a/TODO b/TODO index ca6443825..87b4e28d3 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,6 @@ Before 0.1 ========== -- Don't use configaparser for keys because we can't use = (to bind zoom) - Check FIXMEs - Manpage - Website diff --git a/qutebrowser/config/config.py b/qutebrowser/config/config.py index 6d3151ca5..78c3ce6e9 100644 --- a/qutebrowser/config/config.py +++ b/qutebrowser/config/config.py @@ -187,6 +187,8 @@ class ConfigManager(QObject): for c in self.KEY_ESCAPE: if optname.startswith(c): optname = optname.replace(c, self.ESCAPE_CHAR + c, 1) + # configparser can't handle = in keys :( + optname = optname.replace('=', '') keyval = '{} = {}'.format(optname, value) lines.append(keyval) return lines @@ -203,6 +205,8 @@ class ConfigManager(QObject): for k, v in cp[sectname].items(): if k.startswith(self.ESCAPE_CHAR): k = k[1:] + # configparser can't handle = in keys :( + k = k.replace('', '=') try: self.set('conf', sectname, k, v) except ValidationError as e: diff --git a/qutebrowser/config/configdata.py b/qutebrowser/config/configdata.py index d0000c005..e3ba9a393 100644 --- a/qutebrowser/config/configdata.py +++ b/qutebrowser/config/configdata.py @@ -59,6 +59,7 @@ FIRST_COMMENT = r""" # You will need to escape the following values: # - # at the start of the line (at the first position of the key) (\#) # - $ in a value ($$) +# - = in a value as """ @@ -595,7 +596,7 @@ DATA = OrderedDict([ ('sk', 'set keybind'), ('-', 'zoomout'), ('+', 'zoomin'), - #('=', 'zoom'), + ('=', 'zoom'), ('[[', 'prevpage'), (']]', 'nextpage'), ('{{', 'tabprevpage'),