Adjusting whitespace after the previous change.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5251 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
82373d85f9
commit
67667af233
|
@ -6,6 +6,7 @@
|
||||||
the appearance of an extra newline when undoing the Backspace/Delete.
|
the appearance of an extra newline when undoing the Backspace/Delete.
|
||||||
Patch partially by Mark Majeres. The problem was first reported in
|
Patch partially by Mark Majeres. The problem was first reported in
|
||||||
https://lists.gnu.org/archive/html/nano-devel/2015-06/msg00003.html.
|
https://lists.gnu.org/archive/html/nano-devel/2015-06/msg00003.html.
|
||||||
|
* src/text.c (do_undo): Adjust whitespace after the previous change.
|
||||||
|
|
||||||
2015-06-14 Benno Schulenberg <bensberg@justemail.net>
|
2015-06-14 Benno Schulenberg <bensberg@justemail.net>
|
||||||
* src/winio.c (edit_draw): Add some debugging code to track which
|
* src/winio.c (edit_draw): Add some debugging code to track which
|
||||||
|
|
22
src/text.c
22
src/text.c
|
@ -503,17 +503,17 @@ void do_undo(void)
|
||||||
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. */
|
* don't actually add another line; just position the cursor. */
|
||||||
if (f->next != openfile->filebot || u->xflags != UNdel_backspace ||
|
if (f->next != openfile->filebot || ISSET(NO_NEWLINES) ||
|
||||||
ISSET(NO_NEWLINES)) {
|
u->xflags != UNdel_backspace) {
|
||||||
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);
|
||||||
data[u->mark_begin_x] = '\0';
|
data[u->mark_begin_x] = '\0';
|
||||||
free(f->data);
|
free(f->data);
|
||||||
f->data = data;
|
f->data = data;
|
||||||
splice_node(f, t, f->next);
|
splice_node(f, t, f->next);
|
||||||
if (f == openfile->filebot)
|
if (f == openfile->filebot)
|
||||||
openfile->filebot = t;
|
openfile->filebot = t;
|
||||||
}
|
}
|
||||||
goto_line_posx(u->lineno, u->begin);
|
goto_line_posx(u->lineno, u->begin);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue