From 3f9d5ea0ecc2561ee51be977ffd5ef4cfa0c2b49 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 24 Mar 2018 14:14:19 +0100 Subject: [PATCH] Fix text editor undo w/ 4+ byte utf8 characters --- source/blender/blenkernel/intern/text.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index db1bbeb0a88..5de325277ee 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -1763,7 +1763,7 @@ static void txt_undo_add_charop(Text *text, int op_start, unsigned int c) text->undo_buf[text->undo_pos] = op_start + 3; text->undo_pos++; - txt_undo_store_cursors(text); + txt_undo_store_cur(text); txt_undo_store_uint32(text->undo_buf, &text->undo_pos, c); text->undo_buf[text->undo_pos] = op_start + 3; @@ -1957,7 +1957,7 @@ static unsigned int txt_redo_read_unicode(const char *undo_buf, int *undo_pos, s unicode = BLI_str_utf8_as_unicode(utf8); break; case 4: /* 32-bit unicode symbol */ - unicode = txt_undo_read_uint32(undo_buf, undo_pos); + unicode = txt_redo_read_uint32(undo_buf, undo_pos); break; default: /* should never happen */