1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-28 01:00:28 +03:00

goto file uses the 'path' string-list option instead of hard coded paths

This commit is contained in:
Maxime Coste 2013-03-13 18:52:55 +01:00
parent 4069f42845
commit de536b80cd
2 changed files with 2 additions and 1 deletions

View File

@ -101,7 +101,7 @@ void do_go(Context& context)
if (contains(filename, c))
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();
auto it = find(reversed(buffer_name), '/');
if (it != buffer_name.rend())

View File

@ -239,6 +239,7 @@ GlobalOptions::GlobalOptions()
declare_option<String>("ignored_files", R"(^(\..*|.*\.(o|so|a))$)");
declare_option<String>("filetype", "");
declare_option<std::vector<String>>("completions", {});
declare_option<std::vector<String>>("path", { "./", "/usr/include" });
}
template<typename T>