Fix filename completion
This commit is contained in:
parent
8eef019cf8
commit
bb915f0bc5
|
@ -213,7 +213,7 @@ void register_options()
|
||||||
Regex{});
|
Regex{});
|
||||||
reg.declare_option("filetype", "buffer filetype", ""_str);
|
reg.declare_option("filetype", "buffer filetype", ""_str);
|
||||||
reg.declare_option("path", "path to consider when trying to find a file",
|
reg.declare_option("path", "path to consider when trying to find a file",
|
||||||
Vector<String>({ "./", "/usr/include" }));
|
Vector<String, MemoryDomain::Options>({ "./", "/usr/include" }));
|
||||||
reg.declare_option("completers", "insert mode completers to execute.",
|
reg.declare_option("completers", "insert mode completers to execute.",
|
||||||
InsertCompleterDescList({
|
InsertCompleterDescList({
|
||||||
InsertCompleterDesc{ InsertCompleterDesc::Filename },
|
InsertCompleterDesc{ InsertCompleterDesc::Filename },
|
||||||
|
|
|
@ -211,7 +211,7 @@ void goto_commands(Context& context, NormalParams params)
|
||||||
if (contains(filename, c))
|
if (contains(filename, c))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
auto paths = context.options()["path"].get<Vector<String>>();
|
auto paths = context.options()["path"].get<Vector<String, MemoryDomain::Options>>();
|
||||||
const String& buffer_name = buffer.name();
|
const String& buffer_name = buffer.name();
|
||||||
auto it = find(reversed(buffer_name), '/');
|
auto it = find(reversed(buffer_name), '/');
|
||||||
if (it != buffer_name.rend())
|
if (it != buffer_name.rend())
|
||||||
|
|
Loading…
Reference in New Issue
Block a user