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:
@@ -41,7 +41,7 @@ local imacros=function(s)
|
|||||||
return '(intptr_t)' .. s
|
return '(intptr_t)' .. s
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local N_=function(s) -- luacheck: ignore 211 (currently unused)
|
N_=function(s) -- luacheck: ignore 211 (currently unused)
|
||||||
return function()
|
return function()
|
||||||
return 'N_(' .. cstr(s) .. ')'
|
return 'N_(' .. cstr(s) .. ')'
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -721,7 +721,7 @@ function make_entry.gen_from_vimoptions()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local str_funcname = o.short_desc()
|
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
|
-- if #option.description > opts.desc_col_length then
|
||||||
-- opts.desc_col_length = #option.description
|
-- opts.desc_col_length = #option.description
|
||||||
-- end
|
-- end
|
||||||
@@ -750,10 +750,11 @@ function make_entry.gen_from_vimoptions()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local displayer = entry_display.create {
|
local displayer = entry_display.create {
|
||||||
separator = "│",
|
separator = "",
|
||||||
|
hl_chars = { ['['] = 'TelescopeBorder', [']'] = 'TelescopeBorder' },
|
||||||
items = {
|
items = {
|
||||||
{ width = 25 },
|
{ width = 25 },
|
||||||
{ width = 50 },
|
{ width = 12 },
|
||||||
{ remaining = true },
|
{ remaining = true },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -761,11 +762,9 @@ function make_entry.gen_from_vimoptions()
|
|||||||
local make_display = function(entry)
|
local make_display = function(entry)
|
||||||
|
|
||||||
return displayer {
|
return displayer {
|
||||||
entry.name,
|
{entry.name, "Keyword"},
|
||||||
string.format(
|
{"["..entry.value_type.."]", "Type"},
|
||||||
"[%s] %s",
|
utils.display_termcodes(tostring(entry.current_value)),
|
||||||
entry.value_type,
|
|
||||||
utils.display_termcodes(tostring(entry.current_value))),
|
|
||||||
entry.description,
|
entry.description,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user