tweaks: rename another constant, to be more precise

master
Benno Schulenberg 2017-07-14 16:18:41 +02:00
parent 1e2d9a697a
commit 14c5f03e38
3 changed files with 8 additions and 8 deletions

View File

@ -248,9 +248,9 @@ void do_copy_text(void)
/* Cut from the current cursor position to the end of the file. */
void do_cut_till_eof(void)
{
add_undo(CUT_EOF);
add_undo(CUT_TO_EOF);
do_cut_text(FALSE, TRUE);
update_undo(CUT_EOF);
update_undo(CUT_TO_EOF);
}
#endif /* !NANO_TINY */

View File

@ -158,7 +158,7 @@ typedef enum {
} update_type;
typedef enum {
ADD, DEL, BACK, CUT, CUT_EOF, REPLACE,
ADD, DEL, BACK, CUT, CUT_TO_EOF, REPLACE,
#ifndef DISABLE_WRAPPING
SPLIT_BEGIN, SPLIT_END,
#endif

View File

@ -748,7 +748,7 @@ void do_undo(void)
splice_node(f, t);
goto_line_posx(u->lineno, u->begin);
break;
case CUT_EOF:
case CUT_TO_EOF:
case CUT:
undidmsg = _("text cut");
undo_cut(u);
@ -926,7 +926,7 @@ void do_redo(void)
renumber(f);
goto_line_posx(u->mark_begin_lineno, u->mark_begin_x);
break;
case CUT_EOF:
case CUT_TO_EOF:
case CUT:
redidmsg = _("text cut");
redo_cut(u);
@ -1261,7 +1261,7 @@ void add_undo(undo_type action)
case REPLACE:
u->strdata = mallocstrcpy(NULL, openfile->current->data);
break;
case CUT_EOF:
case CUT_TO_EOF:
cutbuffer_reset();
break;
case CUT:
@ -1395,7 +1395,7 @@ fprintf(stderr, " >> Updating... action = %d, openfile->last_action = %d, openf
#endif
break;
}
case CUT_EOF:
case CUT_TO_EOF:
case CUT:
if (!cutbuffer)
break;
@ -1423,7 +1423,7 @@ fprintf(stderr, " >> Updating... action = %d, openfile->last_action = %d, openf
u->cutbottom = u->cutbottom->next;
u->lineno = u->mark_begin_lineno + u->cutbottom->lineno -
u->cutbuffer->lineno;
if (ISSET(CUT_FROM_CURSOR) || u->type == CUT_EOF) {
if (ISSET(CUT_FROM_CURSOR) || u->type == CUT_TO_EOF) {
u->begin = strlen(u->cutbottom->data);
if (u->lineno == u->mark_begin_lineno)
u->begin += u->mark_begin_x;