deleting a newline and any other character.
Patch by Mark Majeres.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4934
35c25a1d-7b9e-4130-9fde-
d3aeb78583b8
+2014-05-29 Mark Majeres <mark@engine12.com>
+ * src/text.c (do_delete): For the undo structure, differentiate
+ between deleting a newline and any other character.
+
2014-05-29 Chris Allegretta <chrisa@asty.org>
* src/chars.c (addstrings): Needs to be available even on
non-utf-8 sustems.
{
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();
assert(openfile->current_x < strlen(openfile->current->data));
+#ifndef NANO_TINY
+ update_undo(DEL);
+#endif
if (ISSET(SOFTWRAP))
orig_lenpt = strlenpt(openfile->current->data);
assert(openfile->current_x == strlen(openfile->current->data));
+#ifndef NANO_TINY
+ add_undo(DEL);
+#endif
/* If we're deleting at the end of a line, we need to call
* edit_refresh(). */
if (openfile->current->data[openfile->current_x] == '\0')