Commit 793d8490 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

Also the /redoing/ of a Backspace at EOF is a special case.

This fixes Savannah bug #46532.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5444 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent cf0c9403
Showing with 11 additions and 0 deletions
+11 -0
2015-11-26 Benno Schulenberg <bensberg@justemail.net>
* src/text.c (do_redo): Not just the undoing, also the redoing of a
Backspace at EOF is a special case. This fixes Savannah bug #46532.
2015-11-25 Benno Schulenberg <bensberg@justemail.net> 2015-11-25 Benno Schulenberg <bensberg@justemail.net>
* src/nano.c (do_output): Refreshing the whole edit window (instead * src/nano.c (do_output): Refreshing the whole edit window (instead
of just the current line) is not needed for any kind of syntax, but of just the current line) is not needed for any kind of syntax, but
......
...@@ -700,6 +700,13 @@ void do_redo(void) ...@@ -700,6 +700,13 @@ void do_redo(void)
#endif #endif
case JOIN: case JOIN:
redidmsg = _("line join"); redidmsg = _("line join");
/* When the join was done by a Backspace at the tail of the file,
* and the nonewlines flag isn't set, do not join anything, as
* nothing was actually deleted; just position the cursor. */
if (u->xflags == WAS_FINAL_BACKSPACE && !ISSET(NO_NEWLINES)) {
goto_line_posx(u->mark_begin_lineno, u->mark_begin_x);
break;
}
f->data = charealloc(f->data, strlen(f->data) + strlen(u->strdata) + 1); f->data = charealloc(f->data, strlen(f->data) + strlen(u->strdata) + 1);
strcat(f->data, u->strdata); strcat(f->data, u->strdata);
if (f->next != NULL) { if (f->next != NULL) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment