Fix clang compilation

This commit is contained in:
Maxime Coste 2020-04-27 16:59:59 +10:00
parent 50dc0099c3
commit ceff2286af

View File

@ -1512,7 +1512,7 @@ struct OptionBasedHighlighter : Highlighter
OptionType& get_option(const HighlightContext& context) const OptionType& get_option(const HighlightContext& context) const
{ {
return context.context.options()[m_option_name].get_mutable<OptionType>(); return context.context.options()[m_option_name].template get_mutable<OptionType>();
} }
private: private:
@ -1594,10 +1594,11 @@ private:
auto replacement = parse_display_line(spec, context.context.faces()); auto replacement = parse_display_line(spec, context.context.faces());
auto end = is_empty(range) ? range.first : buffer.char_next(range.last); auto end = is_empty(range) ? range.first : buffer.char_next(range.last);
replace_range(display_buffer, range.first, end, replace_range(display_buffer, range.first, end,
[&](DisplayLine& line, DisplayLine::iterator pos){ [&, range=BufferRange{range.first, end}]
(DisplayLine& line, DisplayLine::iterator pos){
for (auto& atom : replacement) for (auto& atom : replacement)
{ {
atom.replace(BufferRange{range.first, end}); atom.replace(range);
pos = ++line.insert(pos, std::move(atom)); pos = ++line.insert(pos, std::move(atom));
} }
}); });