mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-30 23:37:17 +03:00
goto file uses the 'path' string-list option instead of hard coded paths
This commit is contained in:
parent
4069f42845
commit
de536b80cd
@ -101,7 +101,7 @@ void do_go(Context& context)
|
|||||||
if (contains(filename, c))
|
if (contains(filename, c))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::vector<String> paths = { ""_str, "/usr/include/"_str };
|
auto paths = context.options()["path"].get<std::vector<String>>();
|
||||||
const String& buffer_name = context.buffer().name();
|
const String& buffer_name = context.buffer().name();
|
||||||
auto it = find(reversed(buffer_name), '/');
|
auto it = find(reversed(buffer_name), '/');
|
||||||
if (it != buffer_name.rend())
|
if (it != buffer_name.rend())
|
||||||
|
@ -239,6 +239,7 @@ GlobalOptions::GlobalOptions()
|
|||||||
declare_option<String>("ignored_files", R"(^(\..*|.*\.(o|so|a))$)");
|
declare_option<String>("ignored_files", R"(^(\..*|.*\.(o|so|a))$)");
|
||||||
declare_option<String>("filetype", "");
|
declare_option<String>("filetype", "");
|
||||||
declare_option<std::vector<String>>("completions", {});
|
declare_option<std::vector<String>>("completions", {});
|
||||||
|
declare_option<std::vector<String>>("path", { "./", "/usr/include" });
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
Loading…
Reference in New Issue
Block a user