From c9b69d76b01078fbd6f546925cb5c18daf3cd49a Mon Sep 17 00:00:00 2001 From: Laytan Laats Date: Wed, 7 Aug 2024 17:21:56 +0200 Subject: [PATCH] text/edit: fix undo_state_push wrong builder check --- core/text/edit/text_edit.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/text/edit/text_edit.odin b/core/text/edit/text_edit.odin index a4f8c06b9..521a658e1 100644 --- a/core/text/edit/text_edit.odin +++ b/core/text/edit/text_edit.odin @@ -137,7 +137,7 @@ clear_all :: proc(s: ^State) -> (cleared: bool) { // push current text state to the wanted undo|redo stack undo_state_push :: proc(s: ^State, undo: ^[dynamic]^Undo_State) -> mem.Allocator_Error { - if s.builder != nil { + if s.builder == nil { return nil } text := string(s.builder.buf[:])