parent
1704438777
commit
8e000dfe54
@ -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:
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user