If the option has a blank key and desc, do not show it.

Without this, it's impossible to have empty input go back to the current
node, without having an entry show up in the list. Trying to use
_default results in needed an additional node.
This commit is contained in:
Ahmed Charles 2015-10-19 08:45:12 +00:00 committed by Griatch
parent 9ecda0cd89
commit f3498f480a

View file

@ -242,6 +242,8 @@ def evtable_options_formatter(optionlist):
table_width_max = -1
table = []
for key, desc in optionlist:
if not (key or desc):
continue
table_width_max = max(table_width_max,
max(m_len(p) for p in key.split("\n")) +
max(m_len(p) for p in desc.split("\n")) + colsep)