Renaming the undo type UNSPLIT to JOIN, for clarity.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4982 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
b39db7bc63
commit
45fe2adf72
|
@ -3,6 +3,7 @@
|
|||
with CUT_TO_END (which is about cutting to end-of-line).
|
||||
* src/text.c: Upon better thought, elide the unneeded 'to_eof'.
|
||||
* src/text.c: And elide a totally unused 'strdata2'.
|
||||
* src/text.c: Rename the undo type UNSPLIT to JOIN, for clarity.
|
||||
|
||||
2014-06-18 Mark Majeres <mark@engine12.com>
|
||||
* src/text.c (add_undo): Don't start a new undo for CUT when the
|
||||
|
|
|
@ -191,7 +191,7 @@ typedef enum {
|
|||
#ifndef DISABLE_WRAPPING
|
||||
SPLIT_BEGIN, SPLIT_END,
|
||||
#endif
|
||||
UNSPLIT, PASTE, INSERT, ENTER, OTHER
|
||||
JOIN, PASTE, INSERT, ENTER, OTHER
|
||||
} undo_type;
|
||||
|
||||
typedef struct color_pair {
|
||||
|
|
15
src/text.c
15
src/text.c
|
@ -492,7 +492,7 @@ void do_undo(void)
|
|||
f = openfile->current;
|
||||
break;
|
||||
#endif /* !DISABLE_WRAPPING */
|
||||
case UNSPLIT:
|
||||
case JOIN:
|
||||
undidmsg = _("line join");
|
||||
t = make_new_node(f);
|
||||
t->data = mallocstrcpy(NULL, u->strdata);
|
||||
|
@ -631,7 +631,7 @@ void do_redo(void)
|
|||
goto_line_posx(u->lineno, u->begin);
|
||||
break;
|
||||
#endif /* !DISABLE_WRAPPING */
|
||||
case UNSPLIT:
|
||||
case JOIN:
|
||||
undidmsg = _("line join");
|
||||
len = strlen(f->data) + strlen(u->strdata) + 1;
|
||||
f->data = charealloc(f->data, len);
|
||||
|
@ -912,8 +912,8 @@ void add_undo(undo_type current_action)
|
|||
u->mark_begin_x += char_buf_len;
|
||||
break;
|
||||
}
|
||||
/* Else purposely fall into unsplit code. */
|
||||
case UNSPLIT:
|
||||
/* Else purposely fall into the line-joining code. */
|
||||
case JOIN:
|
||||
if (fs->current->next) {
|
||||
if (u->type == BACK) {
|
||||
u->lineno = fs->current->next->lineno;
|
||||
|
@ -922,11 +922,11 @@ void add_undo(undo_type current_action)
|
|||
data = mallocstrcpy(NULL, fs->current->next->data);
|
||||
u->strdata = data;
|
||||
}
|
||||
current_action = u->type = UNSPLIT;
|
||||
current_action = u->type = JOIN;
|
||||
break;
|
||||
#ifndef DISABLE_WRAPPING
|
||||
case SPLIT_BEGIN:
|
||||
current_action = fs->undotop->type;
|
||||
current_action = fs->undotop->type;
|
||||
break;
|
||||
case SPLIT_END:
|
||||
break;
|
||||
|
@ -1091,9 +1091,8 @@ void update_undo(undo_type action)
|
|||
#ifndef DISABLE_WRAPPING
|
||||
case SPLIT_BEGIN:
|
||||
case SPLIT_END:
|
||||
break;
|
||||
#endif /* !DISABLE_WRAPPING */
|
||||
case UNSPLIT:
|
||||
case JOIN:
|
||||
/* These cases are handled by the earlier check for a new line and action. */
|
||||
case OTHER:
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue