diff options
| author | pierroelmito <pierre.clement@gmail.com> | 2016-04-30 10:35:25 +0200 |
|---|---|---|
| committer | pierroelmito <pierre.clement@gmail.com> | 2016-04-30 10:35:25 +0200 |
| commit | d4b8e28d0a48607f873d79323f03a2fa7c8c11b6 (patch) | |
| tree | c94bc62ec9dc41599cb25fe14d086d902ea071df /src | |
| parent | 61c155fc40fff17de182b54a65a383c7b5128b74 (diff) | |
add face to change whitespace colors
Diffstat (limited to 'src')
| -rw-r--r-- | src/face_registry.cc | 1 | ||||
| -rw-r--r-- | src/highlighters.cc | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/face_registry.cc b/src/face_registry.cc index f5f415a2..644802df 100644 --- a/src/face_registry.cc +++ b/src/face_registry.cc @@ -121,6 +121,7 @@ FaceRegistry::FaceRegistry() { "Prompt", Face{ Color::Yellow, Color::Default } }, { "MatchingChar", Face{ Color::Default, Color::Default, Attribute::Bold } }, { "BufferPadding", Face{ Color::Blue, Color::Default } }, + { "WhiteSpace", Face{ Color::Default, Color::Default } }, } {} diff --git a/src/highlighters.cc b/src/highlighters.cc index 0f55e525..70ba867d 100644 --- a/src/highlighters.cc +++ b/src/highlighters.cc @@ -683,6 +683,7 @@ void expand_tabulations(const Context& context, HighlightFlags flags, DisplayBuf void show_whitespaces(const Context& context, HighlightFlags flags, DisplayBuffer& display_buffer, BufferRange) { const int tabstop = context.options()["tabstop"].get<int>(); + auto whitespaceface = get_face("WhiteSpace"); auto& buffer = context.buffer(); for (auto& line : display_buffer.lines()) { @@ -713,6 +714,7 @@ void show_whitespaces(const Context& context, HighlightFlags flags, DisplayBuffe atom_it->replace("·"); else if (c == '\n') atom_it->replace("¬"); + atom_it->face = whitespaceface; break; } } |
