+2009-12-02 Chris Allegretta <chrisa@asty.org>
+ * text.c (add_undo, do_undo, do_redo) - Do not execute cases for SPLIT when DISABLE_WRAPPING
+ is defined. Fixes Savannah bug 28151 (anon).
+
2009-12-02 Jordi Mallach <jordi@gnu.org>
* doc/man/nano.1: Fix escaping of hyphens for the -$ option.
if (u->xflags == UNDO_DEL_BACKSPACE)
openfile->current_x += strlen(u->strdata);
break;
+#ifndef DISABLE_WRAPPING
case SPLIT:
undidmsg = _("line wrap");
f->data = (char *) nrealloc(f->data, strlen(f->data) + strlen(u->strdata) + 1);
}
renumber(f);
break;
+#endif /* DISABLE_WRAPPING */
case UNSPLIT:
undidmsg = _("line join");
t = make_new_node(f);
do_gotolinecolumn(u->lineno, u->begin+1, FALSE, FALSE, FALSE, FALSE);
do_enter(TRUE);
break;
+#ifndef DISABLE_WRAPPING
case SPLIT:
undidmsg = _("line wrap");
if (u->xflags & UNDO_SPLIT_MADENEW)
do_wrap(f, TRUE);
renumber(f);
break;
+#endif /* DISABLE_WRAPPING */
case UNSPLIT:
undidmsg = _("line join");
len = strlen(f->data) + strlen(u->strdata + 1);
u->strdata = data;
}
break;
+#ifndef DISABLE_WRAPPING
case SPLIT:
wrap_loc = break_line(openfile->current->data, fill
#ifndef DISABLE_HELP
u->strdata2 = mallocstrcpy(NULL, fs->current->next->data);
u->begin = wrap_loc;
break;
+#endif /* DISABLE_WRAPPING */
case INSERT:
case REPLACE:
data = mallocstrcpy(NULL, fs->current->data);
case INSERT:
u->mark_begin_lineno = openfile->current->lineno;
break;
+#ifndef DISABLE_WRAPPING
case SPLIT:
/* This will only be called if we made a completely new line,
and as such we should note that so we can destroy it later */
u->xflags = UNDO_SPLIT_MADENEW;
break;
+#endif /* DISABLE_WRAPPING */
case UNSPLIT:
/* These cases are handled by the earlier check for a new line and action */
case ENTER: