Fix missing global (#384)

* add selected command to cmd-history

* make N_ function global

* fix vimoptions description resolution and add color
This commit is contained in:
Senghan Bright
2021-01-04 08:02:11 +01:00
committed by GitHub
parent 6a403ddf98
commit 71ea4130a2
2 changed files with 8 additions and 9 deletions

View File

@@ -721,7 +721,7 @@ function make_entry.gen_from_vimoptions()
end
local str_funcname = o.short_desc()
option.description = assert(loadstring("return " .. str_funcname))()
option.description = assert(loadstring(str_funcname))()
-- if #option.description > opts.desc_col_length then
-- opts.desc_col_length = #option.description
-- end
@@ -750,10 +750,11 @@ function make_entry.gen_from_vimoptions()
end
local displayer = entry_display.create {
separator = "",
separator = "",
hl_chars = { ['['] = 'TelescopeBorder', [']'] = 'TelescopeBorder' },
items = {
{ width = 25 },
{ width = 50 },
{ width = 12 },
{ remaining = true },
},
}
@@ -761,11 +762,9 @@ function make_entry.gen_from_vimoptions()
local make_display = function(entry)
return displayer {
entry.name,
string.format(
"[%s] %s",
entry.value_type,
utils.display_termcodes(tostring(entry.current_value))),
{entry.name, "Keyword"},
{"["..entry.value_type.."]", "Type"},
utils.display_termcodes(tostring(entry.current_value)),
entry.description,
}
end