diff options
| author | Laytan Laats <laytanlaats@hotmail.com> | 2024-08-07 17:21:56 +0200 |
|---|---|---|
| committer | Laytan Laats <laytanlaats@hotmail.com> | 2024-08-07 17:21:56 +0200 |
| commit | c9b69d76b01078fbd6f546925cb5c18daf3cd49a (patch) | |
| tree | 66e5f9badb01063e2556699435f66e1f4fe1ae0d /core/text | |
| parent | 69a15ca5b61e531e3f873ae84335e7d253217f15 (diff) | |
text/edit: fix undo_state_push wrong builder check
Diffstat (limited to 'core/text')
| -rw-r--r-- | core/text/edit/text_edit.odin | 2 |
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[:]) |