Update nuklear_text_editor.c

This commit is contained in:
opsJson 2022-07-30 21:36:01 -03:00 committed by GitHub
parent d28d145732
commit 9f0a601395
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}
}