summaryrefslogtreecommitdiff
path: root/src/display_buffer.cc
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.cc
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.cc')
-rw-r--r--src/display_buffer.cc18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/display_buffer.cc b/src/display_buffer.cc
index 3796cf2a..c4e2d366 100644
--- a/src/display_buffer.cc
+++ b/src/display_buffer.cc
@@ -53,7 +53,6 @@ void DisplayAtom::trim_begin(ColumnCount count)
count).coord();
else
m_text = m_text.substr(count).str();
- check_invariant();
}
void DisplayAtom::trim_end(ColumnCount count)
@@ -64,18 +63,6 @@ void DisplayAtom::trim_end(ColumnCount count)
-count).coord();
else
m_text = m_text.substr(0, m_text.column_length() - count).str();
- check_invariant();
-}
-
-void DisplayAtom::check_invariant() const
-{
-#ifdef KAK_DEBUG
- if (has_buffer_range())
- {
- kak_assert(m_buffer->is_valid(m_range.begin));
- kak_assert(m_buffer->is_valid(m_range.end));
- }
-#endif
}
DisplayLine::DisplayLine(AtomList atoms)
@@ -93,8 +80,6 @@ DisplayLine::iterator DisplayLine::split(iterator it, BufferCoord pos)
DisplayAtom atom = *it;
atom.m_range.end = pos;
it->m_range.begin = pos;
- atom.check_invariant();
- it->check_invariant();
return m_atoms.insert(it, std::move(atom));
}
@@ -106,8 +91,6 @@ DisplayLine::iterator DisplayLine::split(iterator it, ColumnCount pos)
DisplayAtom atom(it->m_text.substr(0, pos).str());
it->m_text = it->m_text.substr(pos).str();
- atom.check_invariant();
- it->check_invariant();
return m_atoms.insert(it, std::move(atom));
}
@@ -174,7 +157,6 @@ void DisplayLine::optimize()
next_atom_it = m_atoms.erase(next_atom_it);
else
atom_it = next_atom_it++;
- atom_it->check_invariant();
}
}