Support multiline setting descriptions.

This commit is contained in:
Florian Bruhin 2014-08-02 22:53:57 +02:00
parent e5c86a5337
commit f8c995d58d
2 changed files with 3 additions and 1 deletions

View File

@ -67,6 +67,8 @@ class SettingOptionCompletionModel(BaseCompletionModel):
# Some stuff (especially ValueList items) don't have a
# description.
desc = ""
else:
desc = desc.splitlines()[0]
value = config.get(section, name, raw=True)
_valitem, _descitem, miscitem = self.new_item(cat, name, desc,
value)

View File

@ -157,7 +157,7 @@ def _get_setting_quickref():
out.append('|==============')
out.append('|Setting|Description')
for optname, _option in sect.items():
desc = sect.descriptions[optname]
desc = sect.descriptions[optname].splitlines()[0]
out.append('|<<setting-{}-{},{}>>|{}'.format(
sectname, optname, optname, desc))
out.append('|==============')