mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-15 01:11:09 +03:00
parent
56237aa8f8
commit
826977eb1b
@ -742,6 +742,9 @@ const CommandDesc remove_highlighter_cmd = {
|
||||
[](const ParametersParser& parser, Context& context, const ShellContext&)
|
||||
{
|
||||
StringView path = parser[0];
|
||||
if (not path.empty() and path.back() == '/') // ignore trailing /
|
||||
path = path.substr(0_byte, path.length() - 1_byte);
|
||||
|
||||
auto rev_path = path | reverse();
|
||||
auto sep_it = find(rev_path, '/');
|
||||
if (sep_it == rev_path.end())
|
||||
|
Loading…
Reference in New Issue
Block a user