summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2014-06-18 20:33:23 +0100
committerMaxime Coste <frrrwww@gmail.com>2014-06-18 20:33:23 +0100
commit6f2569ff30aecad1320b405249baed4bb1c1b6df (patch)
treef76fad78414794bb25900db3681a478ff9c5f04f /src
parent54590f5d79027bcab96b5958b13828a248db2ab1 (diff)
Color Default now means 'keep as is' for most highlighters
Diffstat (limited to 'src')
-rw-r--r--src/highlighters.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/highlighters.cc b/src/highlighters.cc
index ca078978..b1213b6c 100644
--- a/src/highlighters.cc
+++ b/src/highlighters.cc
@@ -151,7 +151,12 @@ void apply_highlighter(const Context& context,
auto apply_colors = [](const ColorPair& colors)
{
- return [&colors](DisplayAtom& atom) { atom.colors = colors; };
+ return [&colors](DisplayAtom& atom) {
+ if (colors.first != Colors::Default)
+ atom.colors.first = colors.first;
+ if (colors.second != Colors::Default)
+ atom.colors.second = colors.second;
+ };
};
using ColorSpec = std::unordered_map<size_t, const ColorPair*>;