mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-22 02:51:32 +03:00
support absolute filenames in insert mode filename completion
This commit is contained in:
parent
2125d95076
commit
70cd671ef6
@ -677,6 +677,10 @@ public:
|
||||
|
||||
String prefix{begin, pos};
|
||||
StringList res;
|
||||
if (prefix.front() == '/')
|
||||
res = Kakoune::complete_filename(prefix, Regex{});
|
||||
else
|
||||
{
|
||||
for (auto dir : options()["path"].get<StringList>())
|
||||
{
|
||||
if (not dir.empty() and dir.back() != '/')
|
||||
@ -684,6 +688,7 @@ public:
|
||||
for (auto& filename : Kakoune::complete_filename(dir + prefix, Regex{}))
|
||||
res.push_back(filename.substr(dir.length()));
|
||||
}
|
||||
}
|
||||
if (res.empty())
|
||||
return {};
|
||||
return { begin.coord(), pos.coord(), std::move(res), buffer.timestamp() };
|
||||
|
Loading…
Reference in New Issue
Block a user