input_options: fix highlighting when require is on

Previously, even when `require` was True, the first option was highlighted as
if it were the default.
This commit is contained in:
Adrian Sampson 2013-01-28 10:11:39 -08:00
parent cc0e9112b4
commit 58dafee966

View file

@ -172,7 +172,7 @@ def input_options(options, require=False, prompt=None, fallback_prompt=None,
index = option.index(found_letter)
# Mark the option's shortcut letter for display.
if (default is None and not numrange and first) \
if (not require and default is None and not numrange and first) \
or (isinstance(default, basestring) and
found_letter.lower() == default.lower()):
# The first option is the default; mark it.