aboutsummaryrefslogtreecommitdiff
path: root/core/text
diff options
context:
space:
mode:
authorLaytan Laats <laytanlaats@hotmail.com>2024-08-07 17:21:56 +0200
committerLaytan Laats <laytanlaats@hotmail.com>2024-08-07 17:21:56 +0200
commitc9b69d76b01078fbd6f546925cb5c18daf3cd49a (patch)
tree66e5f9badb01063e2556699435f66e1f4fe1ae0d /core/text
parent69a15ca5b61e531e3f873ae84335e7d253217f15 (diff)
text/edit: fix undo_state_push wrong builder check
Diffstat (limited to 'core/text')
-rw-r--r--core/text/edit/text_edit.odin2
1 files changed, 1 insertions, 1 deletions
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[:])