void ChatBuffer::addLine(const std::wstring &name, const std::wstring &text)
{
+ m_lines_modified = true;
+
ChatLine line(name, text);
m_unformatted.push_back(line);
m_unformatted.clear();
m_formatted.clear();
m_scroll = 0;
+ m_lines_modified = true;
}
u32 ChatBuffer::getLineCount() const
u32 del_unformatted = 0;
u32 del_formatted = 0;
- while (count > 0 && del_unformatted < m_unformatted.size())
- {
+ while (count > 0 && del_unformatted < m_unformatted.size()) {
++del_unformatted;
// keep m_formatted in sync
- if (del_formatted < m_formatted.size())
- {
-
+ if (del_formatted < m_formatted.size()) {
sanity_check(m_formatted[del_formatted].first);
++del_formatted;
while (del_formatted < m_formatted.size() &&
m_unformatted.erase(m_unformatted.begin(), m_unformatted.begin() + del_unformatted);
m_formatted.erase(m_formatted.begin(), m_formatted.begin() + del_formatted);
+ if (del_unformatted > 0)
+ m_lines_modified = true;
+
if (at_bottom)
m_scroll = getBottomScrollPos();
else
return m_rows;
}
-void ChatBuffer::scrollTop()
-{
- m_scroll = getTopScrollPos();
-}
-
void ChatBuffer::reformat(u32 cols, u32 rows)
{
if (cols == 0 || rows == 0)