From 4f6507b8080216385fffada46624485e91e701c8 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 3 Jan 2013 14:01:34 +0100 Subject: [PATCH] Highlight last selection differently --- src/highlighters.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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