fix buffer creation on empty file
This commit is contained in:
parent
557128b641
commit
f1b15ef86b
|
@ -22,6 +22,9 @@ Buffer::Buffer(String name, Flags flags, std::vector<String> lines)
|
|||
{
|
||||
BufferManager::instance().register_buffer(*this);
|
||||
|
||||
if (lines.empty())
|
||||
lines.emplace_back("\n");
|
||||
|
||||
ByteCount pos = 0;
|
||||
m_lines.reserve(lines.size());
|
||||
for (auto& line : lines)
|
||||
|
|
Loading…
Reference in New Issue
Block a user