Skip to content

Commit

Permalink
Merge pull request vurtun#222 from KalenAnson/master
Browse files Browse the repository at this point in the history
Do not insert a backward delete
  • Loading branch information
vurtun authored Aug 26, 2016
2 parents 727b912 + f614b5d commit abac187
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nuklear.h
Original file line number Diff line number Diff line change
Expand Up @@ -10944,6 +10944,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;
Expand Down

0 comments on commit abac187

Please sign in to comment.