summaryrefslogtreecommitdiff
path: root/src/display_buffer.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2017-06-09 13:22:32 +0100
committerMaxime Coste <mawww@kakoune.org>2017-06-09 13:22:32 +0100
commitf310db639c4ad063f74d4f556ab86afa7d4469b9 (patch)
treeb1bd8364428be2bbad8dc1567280bed7b2ee3168 /src/display_buffer.hh
parente145d05e34a98540c78a774ac39c30edba4972bb (diff)
Rework partial line display logic
Instead of highlighting full lines and then trim them to make them fit in the window, highlight only the visible portion, and rely on the compute_display_setup system introduced for wrapping to setup our buffer range correctly
Diffstat (limited to 'src/display_buffer.hh')
-rw-r--r--src/display_buffer.hh8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/display_buffer.hh b/src/display_buffer.hh
index 981f4960..ac6d4e82 100644
--- a/src/display_buffer.hh
+++ b/src/display_buffer.hh
@@ -31,12 +31,10 @@ public:
enum Type { Range, ReplacedRange, Text };
DisplayAtom(const Buffer& buffer, BufferCoord begin, BufferCoord end)
- : m_type(Range), m_buffer(&buffer), m_range{begin, end}
- { check_invariant(); }
+ : m_type(Range), m_buffer(&buffer), m_range{begin, end} {}
DisplayAtom(String str, Face face = Face{})
- : m_type(Text), m_text(std::move(str)), face(face)
- { check_invariant(); }
+ : m_type(Text), m_text(std::move(str)), face(face) {}
StringView content() const;
ColumnCount length() const;
@@ -72,8 +70,6 @@ public:
void trim_begin(ColumnCount count);
void trim_end(ColumnCount count);
- void check_invariant() const;
-
bool operator==(const DisplayAtom& other) const
{
return face == other.face and type() == other.type() and