cli: use 1-origin addressing when selecting from choices in config
This commit is contained in:
parent
58f1a142ec
commit
dc3f70ff86
|
@ -63,8 +63,8 @@ def select_choice(value, choices, setting, key):
|
|||
break
|
||||
if val is not None:
|
||||
value = val
|
||||
elif ivalue is not None and ivalue >= 0 and ivalue < len(choices):
|
||||
value = choices[ivalue]
|
||||
elif ivalue is not None and ivalue >= 1 and ivalue <= len(choices):
|
||||
value = choices[ivalue - 1]
|
||||
elif lvalue in ('higher', 'lower'):
|
||||
old_value = setting.read() if key is None else setting.read_key(key)
|
||||
if old_value is None:
|
||||
|
|
Loading…
Reference in New Issue