summaryrefslogtreecommitdiff
path: root/src/display_buffer.cc
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2020-04-26 19:27:44 +1000
committerMaxime Coste <mawww@kakoune.org>2020-04-27 17:39:21 +1000
commitcb119251bcd6771e30c7f504e260c514572473c0 (patch)
treea4f0669e9994fac2d3f34dedb984ed78cb3b7ff4 /src/display_buffer.cc
parent0fdfbdfd158ed699629d1010fd571b7c6ebcb87d (diff)
Do not replace partially selected ranges in replace-ranges highlighter
Partially selected ranges should not be replaced to make it possible to see what is actually selected.
Diffstat (limited to 'src/display_buffer.cc')
-rw-r--r--src/display_buffer.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/display_buffer.cc b/src/display_buffer.cc
index d5fc8275..3d68356f 100644
--- a/src/display_buffer.cc
+++ b/src/display_buffer.cc
@@ -265,7 +265,8 @@ DisplayLine parse_display_line(StringView line, const FaceRegistry& faces, const
else
{
content += StringView{pos, it};
- res.push_back({std::move(content), face});
+ if (not content.empty())
+ res.push_back({std::move(content), face});
content.clear();
auto closing = std::find(it+1, end, '}');
if (closing == end)