summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2013-01-03 14:01:34 +0100
committerMaxime Coste <frrrwww@gmail.com>2013-01-03 14:01:34 +0100
commit4f6507b8080216385fffada46624485e91e701c8 (patch)
treedecd94319f98658277d4c6e6070a826dac5fc61f /src
parent0045456f8795337248fa8b9846ae7d202fda5918 (diff)
Highlight last selection differently
Diffstat (limited to 'src')
-rw-r--r--src/highlighters.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/highlighters.cc b/src/highlighters.cc
index d5b6a408..52f8b484 100644
--- a/src/highlighters.cc
+++ b/src/highlighters.cc
@@ -271,8 +271,12 @@ void highlight_selections(Window& window, DisplayBuffer& display_buffer)
const BufferIterator& last = sel.last();
highlight_range(display_buffer, last, utf8::next(last), false,
- [](DisplayAtom& atom) { atom.attribute |= Attributes::Reverse; });
+ [](DisplayAtom& atom) { atom.attribute |= Attributes::Reverse; atom.attribute &= ~Attributes::Underline; });
}
+ const Selection& back = window.selections().back();
+ const BufferIterator& last = back.last();
+ highlight_range(display_buffer, back.begin(), back.end(), false,
+ [](DisplayAtom& atom) { atom.attribute |= Attributes::Bold; });
}
template<void (*highlighter_func)(DisplayBuffer&)>