From 9f0a6013954d6fa0ac44307245450f65b22cfb11 Mon Sep 17 00:00:00 2001 From: opsJson <54485405+opsJson@users.noreply.github.com> Date: Sat, 30 Jul 2022 21:36:01 -0300 Subject: [PATCH] Update nuklear_text_editor.c --- src/nuklear_text_editor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nuklear_text_editor.c b/src/nuklear_text_editor.c index 5b0c03a..bd93250 100644 --- a/src/nuklear_text_editor.c +++ b/src/nuklear_text_editor.c @@ -395,6 +395,7 @@ nk_textedit_text(struct nk_text_edit *state, const char *text, int total_len) { nk_textedit_makeundo_insert(state, state->cursor, 1); ++state->cursor; + state->cursor = NK_MIN(state->cursor, state->string.len); state->has_preferred_x = 0; } }