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). git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4455 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
42a390416e
commit
c9f0799791
|
@ -1,3 +1,7 @@
|
||||||
|
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>
|
2009-12-02 Jordi Mallach <jordi@gnu.org>
|
||||||
* doc/man/nano.1: Fix escaping of hyphens for the -$ option.
|
* doc/man/nano.1: Fix escaping of hyphens for the -$ option.
|
||||||
|
|
||||||
|
|
|
@ -481,6 +481,7 @@ void do_undo(void)
|
||||||
if (u->xflags == UNDO_DEL_BACKSPACE)
|
if (u->xflags == UNDO_DEL_BACKSPACE)
|
||||||
openfile->current_x += strlen(u->strdata);
|
openfile->current_x += strlen(u->strdata);
|
||||||
break;
|
break;
|
||||||
|
#ifndef DISABLE_WRAPPING
|
||||||
case SPLIT:
|
case SPLIT:
|
||||||
undidmsg = _("line wrap");
|
undidmsg = _("line wrap");
|
||||||
f->data = (char *) nrealloc(f->data, strlen(f->data) + strlen(u->strdata) + 1);
|
f->data = (char *) nrealloc(f->data, strlen(f->data) + strlen(u->strdata) + 1);
|
||||||
|
@ -494,6 +495,7 @@ void do_undo(void)
|
||||||
}
|
}
|
||||||
renumber(f);
|
renumber(f);
|
||||||
break;
|
break;
|
||||||
|
#endif /* DISABLE_WRAPPING */
|
||||||
case UNSPLIT:
|
case UNSPLIT:
|
||||||
undidmsg = _("line join");
|
undidmsg = _("line join");
|
||||||
t = make_new_node(f);
|
t = make_new_node(f);
|
||||||
|
@ -618,6 +620,7 @@ void do_redo(void)
|
||||||
do_gotolinecolumn(u->lineno, u->begin+1, FALSE, FALSE, FALSE, FALSE);
|
do_gotolinecolumn(u->lineno, u->begin+1, FALSE, FALSE, FALSE, FALSE);
|
||||||
do_enter(TRUE);
|
do_enter(TRUE);
|
||||||
break;
|
break;
|
||||||
|
#ifndef DISABLE_WRAPPING
|
||||||
case SPLIT:
|
case SPLIT:
|
||||||
undidmsg = _("line wrap");
|
undidmsg = _("line wrap");
|
||||||
if (u->xflags & UNDO_SPLIT_MADENEW)
|
if (u->xflags & UNDO_SPLIT_MADENEW)
|
||||||
|
@ -625,6 +628,7 @@ void do_redo(void)
|
||||||
do_wrap(f, TRUE);
|
do_wrap(f, TRUE);
|
||||||
renumber(f);
|
renumber(f);
|
||||||
break;
|
break;
|
||||||
|
#endif /* DISABLE_WRAPPING */
|
||||||
case UNSPLIT:
|
case UNSPLIT:
|
||||||
undidmsg = _("line join");
|
undidmsg = _("line join");
|
||||||
len = strlen(f->data) + strlen(u->strdata + 1);
|
len = strlen(f->data) + strlen(u->strdata + 1);
|
||||||
|
@ -900,6 +904,7 @@ void add_undo(undo_type current_action)
|
||||||
u->strdata = data;
|
u->strdata = data;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#ifndef DISABLE_WRAPPING
|
||||||
case SPLIT:
|
case SPLIT:
|
||||||
wrap_loc = break_line(openfile->current->data, fill
|
wrap_loc = break_line(openfile->current->data, fill
|
||||||
#ifndef DISABLE_HELP
|
#ifndef DISABLE_HELP
|
||||||
|
@ -913,6 +918,7 @@ void add_undo(undo_type current_action)
|
||||||
u->strdata2 = mallocstrcpy(NULL, fs->current->next->data);
|
u->strdata2 = mallocstrcpy(NULL, fs->current->next->data);
|
||||||
u->begin = wrap_loc;
|
u->begin = wrap_loc;
|
||||||
break;
|
break;
|
||||||
|
#endif /* DISABLE_WRAPPING */
|
||||||
case INSERT:
|
case INSERT:
|
||||||
case REPLACE:
|
case REPLACE:
|
||||||
data = mallocstrcpy(NULL, fs->current->data);
|
data = mallocstrcpy(NULL, fs->current->data);
|
||||||
|
@ -1058,11 +1064,13 @@ void update_undo(undo_type action)
|
||||||
case INSERT:
|
case INSERT:
|
||||||
u->mark_begin_lineno = openfile->current->lineno;
|
u->mark_begin_lineno = openfile->current->lineno;
|
||||||
break;
|
break;
|
||||||
|
#ifndef DISABLE_WRAPPING
|
||||||
case SPLIT:
|
case SPLIT:
|
||||||
/* This will only be called if we made a completely new line,
|
/* 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 */
|
and as such we should note that so we can destroy it later */
|
||||||
u->xflags = UNDO_SPLIT_MADENEW;
|
u->xflags = UNDO_SPLIT_MADENEW;
|
||||||
break;
|
break;
|
||||||
|
#endif /* DISABLE_WRAPPING */
|
||||||
case UNSPLIT:
|
case UNSPLIT:
|
||||||
/* These cases are handled by the earlier check for a new line and action */
|
/* These cases are handled by the earlier check for a new line and action */
|
||||||
case ENTER:
|
case ENTER:
|
||||||
|
|
Loading…
Reference in New Issue