From 63a791d65118bf37606db36ee12287e890d528ea Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 11 Jun 2017 12:01:40 +0100 Subject: Fix the Buffer::end() madness Until now, buffer had multiple recognized end coordinates, either { line_count, 0 } or { line_count - 1, line[line_count - 1].length }. Now the only correct end coord is { line_count, 0 }, removing the need for various special cases. --- src/buffer.hh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/buffer.hh') diff --git a/src/buffer.hh b/src/buffer.hh index d0fdffcb..d2679ba1 100644 --- a/src/buffer.hh +++ b/src/buffer.hh @@ -89,9 +89,9 @@ public: private: SafePtr m_buffer; - StringView m_line; BufferCoord m_coord; - LineCount m_last_line; + LineCount m_line_count; + StringView m_line; }; using BufferLines = Vector; @@ -205,7 +205,6 @@ public: { enum Type : char { Insert, Erase }; Type type; - bool at_end; BufferCoord begin; BufferCoord end; }; -- cgit v1.2.3