c4db46b58b
Generalize this option type, which is a timestamped list of <line number>|<arbitrary string>. That way this type is not strongly coupled with the flag-lines highlighter, and can be reused for other use cases.
27 lines
654 B
C++
27 lines
654 B
C++
#ifndef highlighters_hh_INCLUDED
|
|
#define highlighters_hh_INCLUDED
|
|
|
|
#include "color.hh"
|
|
#include "highlighter.hh"
|
|
|
|
namespace Kakoune
|
|
{
|
|
|
|
void register_highlighters();
|
|
|
|
struct InclusiveBufferRange{ BufferCoord first, last; };
|
|
|
|
inline bool operator==(const InclusiveBufferRange& lhs, const InclusiveBufferRange& rhs)
|
|
{
|
|
return lhs.first == rhs.first and lhs.last == rhs.last;
|
|
}
|
|
String option_to_string(InclusiveBufferRange range);
|
|
void option_from_string(StringView str, InclusiveBufferRange& opt);
|
|
|
|
using LineAndSpec = std::tuple<LineCount, String>;
|
|
using RangeAndString = std::tuple<InclusiveBufferRange, String>;
|
|
|
|
}
|
|
|
|
#endif // highlighters_hh_INCLUDED
|