mirror of
https://github.com/Immediate-Mode-UI/Nuklear.git
synced 2026-11-30 16:48:10 +01:00
Check for incoming backward delete (unicode 127) and do not insert into text box, just process as a text event
This commit is contained in:
@@ -10861,6 +10861,10 @@ nk_textedit_text(struct nk_text_edit *state, const char *text, int total_len)
|
||||
if (!glyph_len) return;
|
||||
while ((text_len < total_len) && glyph_len)
|
||||
{
|
||||
/* don't insert a backward delete, just process the event */
|
||||
if (unicode == 127)
|
||||
break;
|
||||
|
||||
/* can't add newline in single-line mode */
|
||||
if (unicode == '\n' && state->single_line)
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user