mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-30 23:37:17 +03:00
Merge remote-tracking branch 'Delapouite/parse_lines'
This commit is contained in:
commit
f96547719d
@ -53,6 +53,9 @@ static ParsedLines parse_lines(StringView data)
|
||||
pos = eol + 1;
|
||||
}
|
||||
|
||||
if (res.lines.empty())
|
||||
res.lines.emplace_back(StringData::create({"\n"}));
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -79,9 +82,6 @@ Buffer::Buffer(String name, Flags flags, StringView data,
|
||||
{
|
||||
ParsedLines parsed_lines = parse_lines(data);
|
||||
|
||||
if (parsed_lines.lines.empty())
|
||||
parsed_lines.lines.emplace_back(StringData::create({"\n"}));
|
||||
|
||||
#ifdef KAK_DEBUG
|
||||
for (auto& line : parsed_lines.lines)
|
||||
kak_assert(not (line->length == 0) and
|
||||
@ -245,9 +245,6 @@ void Buffer::reload(StringView data, timespec fs_timestamp)
|
||||
{
|
||||
ParsedLines parsed_lines = parse_lines(data);
|
||||
|
||||
if (parsed_lines.lines.empty())
|
||||
parsed_lines.lines.emplace_back(StringData::create({"\n"}));
|
||||
|
||||
const bool record_undo = not (m_flags & Flags::NoUndo);
|
||||
|
||||
commit_undo_group();
|
||||
|
Loading…
Reference in New Issue
Block a user