text/edit: fix undo_state_push wrong builder check

This commit is contained in:
Laytan Laats
2024-08-07 17:21:56 +02:00
parent 69a15ca5b6
commit c9b69d76b0

View File

@@ -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[:])