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).
|
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: Upon better thought, elide the unneeded 'to_eof'.
|
||||||
* src/text.c: And elide a totally unused 'strdata2'.
|
* 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>
|
2014-06-18 Mark Majeres <mark@engine12.com>
|
||||||
* src/text.c (add_undo): Don't start a new undo for CUT when the
|
* src/text.c (add_undo): Don't start a new undo for CUT when the
|
||||||
|
|
|
@ -191,7 +191,7 @@ typedef enum {
|
||||||
#ifndef DISABLE_WRAPPING
|
#ifndef DISABLE_WRAPPING
|
||||||
SPLIT_BEGIN, SPLIT_END,
|
SPLIT_BEGIN, SPLIT_END,
|
||||||
#endif
|
#endif
|
||||||
UNSPLIT, PASTE, INSERT, ENTER, OTHER
|
JOIN, PASTE, INSERT, ENTER, OTHER
|
||||||
} undo_type;
|
} undo_type;
|
||||||
|
|
||||||
typedef struct color_pair {
|
typedef struct color_pair {
|
||||||
|
|
13
src/text.c
13
src/text.c
|
@ -492,7 +492,7 @@ void do_undo(void)
|
||||||
f = openfile->current;
|
f = openfile->current;
|
||||||
break;
|
break;
|
||||||
#endif /* !DISABLE_WRAPPING */
|
#endif /* !DISABLE_WRAPPING */
|
||||||
case UNSPLIT:
|
case JOIN:
|
||||||
undidmsg = _("line join");
|
undidmsg = _("line join");
|
||||||
t = make_new_node(f);
|
t = make_new_node(f);
|
||||||
t->data = mallocstrcpy(NULL, u->strdata);
|
t->data = mallocstrcpy(NULL, u->strdata);
|
||||||
|
@ -631,7 +631,7 @@ void do_redo(void)
|
||||||
goto_line_posx(u->lineno, u->begin);
|
goto_line_posx(u->lineno, u->begin);
|
||||||
break;
|
break;
|
||||||
#endif /* !DISABLE_WRAPPING */
|
#endif /* !DISABLE_WRAPPING */
|
||||||
case UNSPLIT:
|
case JOIN:
|
||||||
undidmsg = _("line join");
|
undidmsg = _("line join");
|
||||||
len = strlen(f->data) + strlen(u->strdata) + 1;
|
len = strlen(f->data) + strlen(u->strdata) + 1;
|
||||||
f->data = charealloc(f->data, len);
|
f->data = charealloc(f->data, len);
|
||||||
|
@ -912,8 +912,8 @@ void add_undo(undo_type current_action)
|
||||||
u->mark_begin_x += char_buf_len;
|
u->mark_begin_x += char_buf_len;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* Else purposely fall into unsplit code. */
|
/* Else purposely fall into the line-joining code. */
|
||||||
case UNSPLIT:
|
case JOIN:
|
||||||
if (fs->current->next) {
|
if (fs->current->next) {
|
||||||
if (u->type == BACK) {
|
if (u->type == BACK) {
|
||||||
u->lineno = fs->current->next->lineno;
|
u->lineno = fs->current->next->lineno;
|
||||||
|
@ -922,7 +922,7 @@ void add_undo(undo_type current_action)
|
||||||
data = mallocstrcpy(NULL, fs->current->next->data);
|
data = mallocstrcpy(NULL, fs->current->next->data);
|
||||||
u->strdata = data;
|
u->strdata = data;
|
||||||
}
|
}
|
||||||
current_action = u->type = UNSPLIT;
|
current_action = u->type = JOIN;
|
||||||
break;
|
break;
|
||||||
#ifndef DISABLE_WRAPPING
|
#ifndef DISABLE_WRAPPING
|
||||||
case SPLIT_BEGIN:
|
case SPLIT_BEGIN:
|
||||||
|
@ -1091,9 +1091,8 @@ void update_undo(undo_type action)
|
||||||
#ifndef DISABLE_WRAPPING
|
#ifndef DISABLE_WRAPPING
|
||||||
case SPLIT_BEGIN:
|
case SPLIT_BEGIN:
|
||||||
case SPLIT_END:
|
case SPLIT_END:
|
||||||
break;
|
|
||||||
#endif /* !DISABLE_WRAPPING */
|
#endif /* !DISABLE_WRAPPING */
|
||||||
case UNSPLIT:
|
case JOIN:
|
||||||
/* 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 OTHER:
|
case OTHER:
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue