Remove unnecessary workaround in Buffer::insert
This commit is contained in:
parent
3f856d4e30
commit
30c05e83f8
|
@ -505,11 +505,8 @@ BufferRange Buffer::insert(BufferCoord pos, StringView content)
|
||||||
else
|
else
|
||||||
real_content = intern(content);
|
real_content = intern(content);
|
||||||
|
|
||||||
// for undo and redo purpose it is better to use one past last line rather
|
|
||||||
// than one past last char coord.
|
|
||||||
auto coord = is_end(pos) ? line_count() : pos;
|
|
||||||
if (not (m_flags & Flags::NoUndo))
|
if (not (m_flags & Flags::NoUndo))
|
||||||
m_current_undo_group.push_back({Modification::Insert, coord, real_content});
|
m_current_undo_group.push_back({Modification::Insert, pos, real_content});
|
||||||
return do_insert(pos, real_content->strview());
|
return do_insert(pos, real_content->strview());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user