Buffer: fix compute_lines on empty_buffer
This commit is contained in:
parent
aa1c4d64f9
commit
0e398566d2
|
@ -102,7 +102,7 @@ void Buffer::compute_lines()
|
||||||
{
|
{
|
||||||
m_lines.clear();
|
m_lines.clear();
|
||||||
m_lines.push_back(0);
|
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')
|
if (m_content[i] == '\n')
|
||||||
m_lines.push_back(i + 1);
|
m_lines.push_back(i + 1);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user