Commit 61966646 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

Making it more transparent what WAS_FINAL_BACKSPACE does.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5283 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 11 additions and 2 deletions
+11 -2
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
src/rcfile.c (parse_binding): When defining the toggles, give each src/rcfile.c (parse_binding): When defining the toggles, give each
of them a sequence number, so that, when they are rebound, they can of them a sequence number, so that, when they are rebound, they can
still be listed in the original order in the help text. still be listed in the original order in the help text.
* src/text.c (do_undo): Make it clearer what WAS_FINAL_BACKSPACE does.
GNU nano 2.4.2 - 2015.07.05 GNU nano 2.4.2 - 2015.07.05
2015-06-28 Benno Schulenberg <bensberg@justemail.net> 2015-06-28 Benno Schulenberg <bensberg@justemail.net>
......
...@@ -71,3 +71,6 @@ Current Status ...@@ -71,3 +71,6 @@ Current Status
GNU nano has reached its fifth stable milestone, 2.4.x. GNU nano has reached its fifth stable milestone, 2.4.x.
Development of new features will continue in the 2.5.x branch, Development of new features will continue in the 2.5.x branch,
while 2.4.x versions are dedicated to bug-fixing and polishing. while 2.4.x versions are dedicated to bug-fixing and polishing.
...@@ -493,8 +493,13 @@ void do_undo(void) ...@@ -493,8 +493,13 @@ void do_undo(void)
case JOIN: case JOIN:
undidmsg = _("line join"); undidmsg = _("line join");
/* When the join was done by a Backspace at the tail of the file, /* When the join was done by a Backspace at the tail of the file,
* don't actually add another line; just position the cursor. */ * and the nonewlines flag isn't set, do not re-add a newline that
if (ISSET(NO_NEWLINES) || u->xflags != WAS_FINAL_BACKSPACE) { * wasn't actually deleted; just position the cursor. */
if (u->xflags == WAS_FINAL_BACKSPACE && !ISSET(NO_NEWLINES)) {
goto_line_posx(openfile->filebot->lineno, 0);
break;
}
{/*FIXME: unindent*/
t = make_new_node(f); t = make_new_node(f);
t->data = mallocstrcpy(NULL, u->strdata); t->data = mallocstrcpy(NULL, u->strdata);
data = mallocstrncpy(NULL, f->data, u->mark_begin_x + 1); data = mallocstrncpy(NULL, f->data, u->mark_begin_x + 1);
......
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