mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-30 23:37:17 +03:00
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