Fix access to dead temporary
This commit is contained in:
parent
b73a890f8c
commit
d6168a90fc
|
@ -48,11 +48,14 @@ Completions HighlighterGroup::complete_child(StringView path, ByteCount cursor_p
|
||||||
return offset_pos(hl.complete_child(path.substr(offset), cursor_pos - offset, group), offset);
|
return offset_pos(hl.complete_child(path.substr(offset), cursor_pos - offset, group), offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto c = transformed(filtered(m_highlighters,
|
auto candidates = complete(
|
||||||
[=](const HighlighterMap::Element& hl)
|
path, cursor_pos,
|
||||||
{ return not group or hl.value->has_children(); }),
|
transformed(filtered(m_highlighters,
|
||||||
HighlighterMap::get_id);
|
[=](const HighlighterMap::Element& hl)
|
||||||
return { 0, 0, complete(path, cursor_pos, c) };
|
{ return not group or hl.value->has_children(); }),
|
||||||
|
HighlighterMap::get_id));
|
||||||
|
|
||||||
|
return { 0, 0, std::move(candidates) };
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user