mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-15 01:11:09 +03:00
parent
126dd11ba8
commit
9518f279fb
@ -1244,10 +1244,11 @@ const CommandDesc source_cmd = {
|
|||||||
|
|
||||||
static String option_doc_helper(const Context& context, CommandParameters params)
|
static String option_doc_helper(const Context& context, CommandParameters params)
|
||||||
{
|
{
|
||||||
if (params.size() < 2)
|
const bool add = params.size() > 1 and params[0] == "-add";
|
||||||
|
if (params.size() < 2 + (add ? 1 : 0))
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
auto desc = GlobalScope::instance().option_registry().option_desc(params[1]);
|
auto desc = GlobalScope::instance().option_registry().option_desc(params[1 + (add ? 1 : 0)]);
|
||||||
if (not desc or desc->docstring().empty())
|
if (not desc or desc->docstring().empty())
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user