diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-06-11 12:01:40 +0100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-06-11 12:01:40 +0100 |
| commit | 63a791d65118bf37606db36ee12287e890d528ea (patch) | |
| tree | 3812cb83f684486484b7ab099d768e98e7fca982 /src/buffer.hh | |
| parent | b4647a16dda162c78fd7628f1ebb7325e95ba38c (diff) | |
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.
Diffstat (limited to 'src/buffer.hh')
| -rw-r--r-- | src/buffer.hh | 5 |
1 files changed, 2 insertions, 3 deletions
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<const Buffer> m_buffer; - StringView m_line; BufferCoord m_coord; - LineCount m_last_line; + LineCount m_line_count; + StringView m_line; }; using BufferLines = Vector<StringDataPtr, MemoryDomain::BufferContent>; @@ -205,7 +205,6 @@ public: { enum Type : char { Insert, Erase }; Type type; - bool at_end; BufferCoord begin; BufferCoord end; }; |
