From f3498f480afd72559bc507341d5a1ae70ded821d Mon Sep 17 00:00:00 2001 From: Ahmed Charles Date: Mon, 19 Oct 2015 08:45:12 +0000 Subject: [PATCH] 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. --- evennia/utils/evmenu.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/evennia/utils/evmenu.py b/evennia/utils/evmenu.py index 541a53936f..55da3e32aa 100644 --- a/evennia/utils/evmenu.py +++ b/evennia/utils/evmenu.py @@ -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)