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
#ifndef DISABLE_WRAPPING
SPLIT_BEGIN, SPLIT_END,
#endif
- UNSPLIT, PASTE, INSERT, ENTER, OTHER
+ JOIN, PASTE, INSERT, ENTER, OTHER
} undo_type;
typedef struct color_pair {
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);
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);
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;
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;
#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;