diff --git a/doc/help/configuring.asciidoc b/doc/help/configuring.asciidoc index 62b10ebf5..6104d8d6c 100644 --- a/doc/help/configuring.asciidoc +++ b/doc/help/configuring.asciidoc @@ -11,8 +11,9 @@ Migrating older configurations ------------------------------ qutebrowser does no automatic migration for the new configuration. However, -there's a special link:qute://configdiff[] page in qutebrowser, which will show -you the changes you did in your old configuration, compared to the old defaults. +there's a special link:qute://configdiff/old[configdiff] page in qutebrowser, +which will show you the changes you did in your old configuration, compared to +the old defaults. Other changes in default settings: diff --git a/qutebrowser/browser/qutescheme.py b/qutebrowser/browser/qutescheme.py index 6bf27e7d8..b49520002 100644 --- a/qutebrowser/browser/qutescheme.py +++ b/qutebrowser/browser/qutescheme.py @@ -408,11 +408,15 @@ def qute_settings(url): @add_handler('configdiff') -def qute_configdiff(_url): +def qute_configdiff(url): """Handler for qute://configdiff.""" - try: - return 'text/html', configdiff.get_diff() - except OSError as e: - error = (b'Failed to read old config: ' + - str(e.strerror).encode('utf-8')) - return 'text/plain', error + if url.path() == '/old': + try: + return 'text/html', configdiff.get_diff() + except OSError as e: + error = (b'Failed to read old config: ' + + str(e.strerror).encode('utf-8')) + return 'text/plain', error + else: + data = config.instance.dump_userconfig().encode('utf-8') + return 'text/plain', data