Fix EndEdit when edits->len == 0

This commit is contained in:
Krzosa Karol
2026-01-24 14:11:40 +01:00
parent 05b6a7bb3c
commit f5825f050c

View File

@@ -1064,6 +1064,10 @@ API void EndEdit(Buffer *buffer, Array<Edit> *edits, Array<Caret> *carets, bool
Assert(buffer->edit_phase == 2);
buffer->edit_phase -= 2;
if (edits->len == 0) {
return;
}
#if BUFFER_DEBUG
if (buffer->no_history == false) {
HistoryEntry *entry = GetLast(buffer->undo_stack);