Index: src/text.c =================================================================== --- src/text.c (revision 4925) +++ src/text.c (working copy) @@ -68,15 +68,14 @@ { size_t orig_lenpt = 0; -#ifndef NANO_TINY - update_undo(DEL); -#endif - assert(openfile->current != NULL && openfile->current->data != NULL && openfile->current_x <= strlen(openfile->current->data)); openfile->placewewant = xplustabs(); if (openfile->current->data[openfile->current_x] != '\0') { +#ifndef NANO_TINY + update_undo(DEL); +#endif int char_buf_len = parse_mbchar(openfile->current->data + openfile->current_x, NULL, NULL); size_t line_len = strlen(openfile->current->data + @@ -102,6 +101,9 @@ #endif openfile->totsize--; } else if (openfile->current != openfile->filebot) { +#ifndef NANO_TINY + add_undo(DEL); +#endif filestruct *foo = openfile->current->next; assert(openfile->current_x == strlen(openfile->current->data));