summaryrefslogtreecommitdiff
path: root/src/display_buffer.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2017-05-26 08:00:15 +0100
committerMaxime Coste <mawww@kakoune.org>2017-05-26 08:00:15 +0100
commitb1bb9d0cb23f9c582629dbb7180048a7ce41d945 (patch)
treed417192e2ee98bfd8c5825cc490a42287a1ae0dc /src/display_buffer.hh
parent6e389512f548d3efdb4f25407fb51e0cbbdc8051 (diff)
Small documentation tweak in display_buffer.hh
Diffstat (limited to 'src/display_buffer.hh')
-rw-r--r--src/display_buffer.hh7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/display_buffer.hh b/src/display_buffer.hh
index 18b238d8..981f4960 100644
--- a/src/display_buffer.hh
+++ b/src/display_buffer.hh
@@ -134,6 +134,7 @@ public:
// the line is less that col_count character
void trim(ColumnCount first_col, ColumnCount col_count, bool only_buffer);
+ // Merge together consecutive atoms sharing the same display attributes
void optimize();
private:
void compute_range();
@@ -146,7 +147,7 @@ DisplayLine parse_display_line(StringView line, const HashMap<String, DisplayLin
class DisplayBuffer : public UseMemoryDomain<MemoryDomain::Display>
{
public:
- using LineList = Vector<DisplayLine, MemoryDomain::Display>;
+ using LineList = Vector<DisplayLine>;
DisplayBuffer() {}
LineList& lines() { return m_lines; }
@@ -154,9 +155,11 @@ public:
// returns the smallest BufferRange which contains every DisplayAtoms
const BufferRange& range() const { return m_range; }
- void optimize();
void compute_range();
+ // Optimize all lines, set DisplayLine::optimize
+ void optimize();
+
private:
LineList m_lines;
BufferRange m_range;