1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-24 20:13:00 +03:00

Buffer: fix compute_lines on empty_buffer

This commit is contained in:
Maxime Coste 2011-12-28 18:52:14 +00:00
parent aa1c4d64f9
commit 0e398566d2

View File

@ -102,7 +102,7 @@ void Buffer::compute_lines()
{
m_lines.clear();
m_lines.push_back(0);
for (BufferPos i = 0; i < m_content.size()-1; ++i)
for (BufferPos i = 0; i + 1 < m_content.size(); ++i)
{
if (m_content[i] == '\n')
m_lines.push_back(i + 1);