diff --git a/src/cut.c b/src/cut.c index b82d1075..43f87e2f 100644 --- a/src/cut.c +++ b/src/cut.c @@ -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 */ diff --git a/src/nano.h b/src/nano.h index 8c4d00c1..2c1aef2a 100644 --- a/src/nano.h +++ b/src/nano.h @@ -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 diff --git a/src/text.c b/src/text.c index 7950aed6..fda74581 100644 --- a/src/text.c +++ b/src/text.c @@ -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;