diff --git a/src/buffer.cc b/src/buffer.cc index 78d89ce4..ba10d40e 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -22,6 +22,9 @@ Buffer::Buffer(String name, Flags flags, std::vector 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)