mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-01 10:11:14 -03:00
webconfig: Fix binding tab
This broke when --preset was introduced. We allow a "--preset" or "--user" to appear right after the "bind", and save the value, but don't use it yet. Fixes #5534. [ci skip]
This commit is contained in:
@@ -702,6 +702,20 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||
for line in out.split('\n'):
|
||||
comps = line.split(' ', 2)
|
||||
|
||||
# If we don't have "bind", a sequence and a mapping,
|
||||
# it's not a valid binding.
|
||||
if len(comps) < 3:
|
||||
continue
|
||||
|
||||
# Store the "--preset" value for later
|
||||
if comps[1] == '--preset':
|
||||
preset = True
|
||||
# There's possibly a way to do this faster, but it's not important.
|
||||
comps = line.split(' ', 3)[1:]
|
||||
elif comps[1] == '--user':
|
||||
preset = False
|
||||
comps = line.split(' ', 3)[1:]
|
||||
# Check again if we removed the level.
|
||||
if len(comps) < 3:
|
||||
continue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user