Fix using invalid strings for undo content strings
The code was wrongly using the write_it instead of the read_it to access the removed lines content. Fixes #5088
This commit is contained in:
parent
0674311945
commit
5ea5c99c58
|
@ -261,7 +261,7 @@ void Buffer::reload(BufferLines lines, ByteOrderMark bom, EolFormat eolformat, F
|
||||||
for (LineCount line = len-1; line >= 0; --line)
|
for (LineCount line = len-1; line >= 0; --line)
|
||||||
m_current_undo_group.push_back({
|
m_current_undo_group.push_back({
|
||||||
Modification::Erase, cur_line + line,
|
Modification::Erase, cur_line + line,
|
||||||
m_lines.get_storage(cur_line + line)});
|
*(read_it + (size_t)line)});
|
||||||
|
|
||||||
read_it += len;
|
read_it += len;
|
||||||
m_changes.push_back({ Change::Erase, cur_line, cur_line + len });
|
m_changes.push_back({ Change::Erase, cur_line, cur_line + len });
|
||||||
|
|
Loading…
Reference in New Issue
Block a user